From: Olaf Wintermann Date: Thu, 18 Dec 2025 16:23:58 +0000 (+0100) Subject: fix auto-delete switch initialization in the settings window X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=18b6441fadacac2f49aaec062d9ed1d776dd9da8;p=rssreader.git fix auto-delete switch initialization in the settings window --- diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/ConfigWindow.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/ConfigWindow.kt index d41ece3..eb3b838 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/ConfigWindow.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/ConfigWindow.kt @@ -13,6 +13,7 @@ class ConfigWindow { val defaultUpdateInterval: UiInteger val minUpdateWaitTime: UiInteger val autoUpdateStartDelay: UiInteger + val autoDelete: UiInteger val maxItemAge: UiInteger val message: UiString @@ -33,6 +34,7 @@ class ConfigWindow { defaultUpdateInterval = window.integer() minUpdateWaitTime = window.integer() autoUpdateStartDelay = window.integer() + autoDelete = window.integer() maxItemAge = window.integer() message = window.string() @@ -71,12 +73,12 @@ class ConfigWindow { row { rlabel("Auto Delete Items") - switch(overrideDefaults = true, vfill = true, enableState = ENABLE_AUTO_DELETE) + switch(value = autoDelete, overrideDefaults = true, vfill = true, enableState = ENABLE_AUTO_DELETE) } row { rlabel("Max Item Age (Days)") - spinbox(intValue = maxItemAge, min = 0.0, max = 200000.0, states = intArrayOf(ENABLE_AUTO_DELETE)) + spinbox(intValue = maxItemAge, min = 1.0, max = 200000.0, states = intArrayOf(ENABLE_AUTO_DELETE)) } } } @@ -108,6 +110,7 @@ class ConfigWindow { defaultUpdateInterval.setIntValue(App.settings.defaultRefreshInterval) minUpdateWaitTime.setIntValue(App.settings.minRefreshWaitTime) autoUpdateStartDelay.setIntValue(App.settings.autoRefreshStartDelay) + autoDelete.setBooleanValue(App.settings.maxItemAge > 0) maxItemAge.setIntValue(App.settings.maxItemAge) }