From ad301295ffac0d06424f95116391a82a5ca3a9e1 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Tue, 23 Dec 2025 18:47:46 +0100 Subject: [PATCH] only reload feedlist once when the filter changes --- .../src/main/kotlin/de/unixwork/rssreader/App.kt | 12 +++++++++--- .../main/kotlin/de/unixwork/rssreader/FeedList.kt | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt index dc20113..17c5b7b 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/App.kt @@ -124,13 +124,19 @@ object App : Application { separator() menu("Filter") { radioItem(label = "All items", varname = "filter") { event -> - window?.feedList?.reloadCurrentFeed() + if(event.intValue == 1) { + window?.feedList?.reloadCurrentFeed() + } } radioItem(label = "Unread items", varname = "filter") { event -> - window?.feedList?.reloadCurrentFeed() + if(event.intValue == 1) { + window?.feedList?.reloadCurrentFeed() + } } radioItem(label = "Bookmarked items", varname = "filter") { event -> - window?.feedList?.reloadCurrentFeed() + if(event.intValue == 1) { + window?.feedList?.reloadCurrentFeed() + } } } separator() diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedList.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedList.kt index da82339..dda38df 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedList.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedList.kt @@ -44,7 +44,7 @@ class FeedList(window: MainWindow) : Document() { Database.updateFeedReadState(feed, true) } } - + var filterMode = filter.intValue() showFeed = feed -- 2.47.3