Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions GUI/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def __init__(self, title):

# Data caches
self.feed = []
self._visible_feed = []
self.repos = []
self.starred = []
self.watched = []
Expand Down Expand Up @@ -387,8 +388,9 @@ def on_list_key_hook(self, event):
def get_selected_feed_event(self):
"""Get the currently selected feed event."""
selection = self.feed_list.GetSelection()
if selection != wx.NOT_FOUND and selection < len(self.feed):
return self.feed[selection]
visible = getattr(self, '_visible_feed', self.feed)
if selection != wx.NOT_FOUND and selection < len(visible):
return visible[selection]
return None

def on_feed_list_key_hook(self, event):
Expand Down Expand Up @@ -925,9 +927,15 @@ def _load_feed(self):

def _render_feed_list(self):
"""Render feed list from current event data while preserving selection."""
from models.feed_filter import load_visible_types, load_muted_repos, load_user_filters, filter_feed
visible = load_visible_types(self.app.currentAccount.prefs) if self.app.currentAccount else None
muted_repos = load_muted_repos(self.app.currentAccount.prefs) if self.app.currentAccount else None
user_filters = load_user_filters(self.app.currentAccount.prefs) if self.app.currentAccount else None
self._visible_feed = filter_feed(self.feed, visible, muted_repos, user_filters)

selection = self.feed_list.GetSelection()
self.feed_list.Clear()
for event in self.feed:
for event in self._visible_feed:
self.feed_list.Append(event.format_display())
if selection != wx.NOT_FOUND and selection < self.feed_list.GetCount():
self.feed_list.SetSelection(selection)
Expand Down
Loading