From: Olaf Wintermann Date: Mon, 29 Jun 2026 17:48:06 +0000 (+0200) Subject: fix feed uri is not updated by FeedConfig.updateFeed() X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=e2c965eb1b4b299ec15a47ba02e58e0b18c592f4;p=rssreader.git fix feed uri is not updated by FeedConfig.updateFeed() --- diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/Feed.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/Feed.kt index 3ec5dff..0162103 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/Feed.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/Feed.kt @@ -6,7 +6,7 @@ import java.time.Instant class Feed(id: Int, name: String, uri: String) { val id = id var name = name - val uri = uri + var uri = uri var user: String? = null var password: String? = null var certpath: String? = null diff --git a/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedConfig.kt b/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedConfig.kt index 483c49f..37865c8 100644 --- a/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedConfig.kt +++ b/rss-application/src/main/kotlin/de/unixwork/rssreader/FeedConfig.kt @@ -257,7 +257,6 @@ class FeedConfig(obj: UiObject) { public fun updateFeed() { val feedName = name.toString() val urlStr = uri.toString() - val uris = urlStr.split("\n").map { it.trim() }.filter { it.isNotBlank() } var itemStateMode = readstatus.selectedIndex val internalBrowser = itemContent.selectedIndex == 1 var autoDelete = autoDeleteOptions.selectedIndex @@ -280,15 +279,16 @@ class FeedConfig(obj: UiObject) { var u:String? = user.toString() var p:String? = password.toString() - if(u?.isEmpty() == true) { + if(u.isNullOrEmpty()) { u = null } - if(p?.isEmpty() == true) { + if(p.isNullOrEmpty()) { p = null } feed?.let { it.name = feedName + it.uri = urlStr it.updateInterval = updateIntv it.itemStateMode = itemStateMode it.internalBrowser = internalBrowser