From: Olaf Wintermann Date: Tue, 23 Dec 2025 17:47:46 +0000 (+0100) Subject: only reload feedlist once when the filter changes X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=ad301295ffac0d06424f95116391a82a5ca3a9e1;p=rssreader.git only reload feedlist once when the filter changes --- 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