From: Olaf Wintermann Date: Sat, 6 Sep 2025 12:31:22 +0000 (+0200) Subject: remember previously selected group in the new feed dialog X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=8335792508c02260ecc046e64d1de2e66f891800;p=rssreader.git remember previously selected group in the new feed dialog --- diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt index 849cf1e..7cbb3f6 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/MainWindow.kt @@ -22,6 +22,8 @@ class MainWindow { // TODO: date format config val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") + var newFeedPrevGroup = 0 + init { window = sidebarWindow("RSS Reader") { sidebar { @@ -197,6 +199,9 @@ class MainWindow { ) parent.feeds.update() + + newFeedPrevGroup = groups?.selectedIndex ?: 0 + println("new prev group: $newFeedPrevGroup") } catch (e: Exception) { e.printStackTrace() } @@ -215,6 +220,7 @@ class MainWindow { cert = ui.string() groups.addAll(sourceList.groups) + println("prev group: $newFeedPrevGroup") readstatus.add("Mark items individually") readstatus.add("Mark entire feed when opened") @@ -272,6 +278,7 @@ class MainWindow { } } } + groups?.setSelectedIndex(newFeedPrevGroup) w.show() }