val message: UiString
+ companion object {
+ val ENABLE_AUTO_DELETE = 1000
+ }
+
init {
window = simpleWindow("")
window.ui.setSize(600, 500)
message = window.ui.string()
window {
- grid(margin = 12, rowspacing = 8, columnspacing = 8, defhfill = true, defvfill = true, fill = true) {
- row {
- rlabel("Date Format")
- textfield(value = dateFormat, hexpand = true)
- }
+ tabview(margin = 12, fill = true) {
+ tab("General") {
+ grid(margin = 12, rowspacing = 8, columnspacing = 8, defhfill = true, defvfill = true, fill = true) {
+ row {
+ rlabel("Date Format")
+ textfield(value = dateFormat, hexpand = true)
+ }
- row {
- rlabel("Date Format Today")
- textfield(value = dateFormatToday, hexpand = true)
+ row {
+ rlabel("Date Format Today")
+ textfield(value = dateFormatToday, hexpand = true)
+ }
+ }
}
+ tab("Update") {
+ grid(margin = 12, rowspacing = 8, columnspacing = 8, defhfill = true, defvfill = true, fill = true) {
+ row {
+ rlabel("Default Update Interval (Seconds)")
+ spinbox(intValue = defaultUpdateInterval, min = 0.0, max = 1000000.0)
+ }
- row {
- rlabel("Default Update Interval (Seconds)")
- spinbox(intValue = defaultUpdateInterval, min = 0.0, max = 1000000.0)
- }
+ row {
+ rlabel("Minimum Update Wait Time (Seconds)")
+ spinbox(intValue = minUpdateWaitTime, min = 0.0, max = 1000000.0)
+ }
- row {
- rlabel("Minimum Update Wait Time (Seconds)")
- spinbox(intValue = minUpdateWaitTime, min = 0.0, max = 1000000.0)
- }
+ row {
+ rlabel("Auto Update Start Delay (Seconds)")
+ spinbox(intValue = autoUpdateStartDelay, min = 0.0, max = 1000000.0)
+ }
- row {
- rlabel("Auto Update Start Delay (Seconds)")
- spinbox(intValue = autoUpdateStartDelay, min = 0.0, max = 1000000.0)
- }
+ row {
+ rlabel("Auto Delete Items")
+ switch(overrideDefaults = true, vfill = true)
+ }
- row {
- rlabel("Max Item Age (Days)")
- spinbox(intValue = maxItemAge, min = 0.0, max = 200000.0)
+ row {
+ rlabel("Max Item Age (Days)")
+ spinbox(intValue = maxItemAge, min = 0.0, max = 200000.0)
+ }
+ }
}
}
- grid(margin = 12, rowspacing = 12) {
+ grid(marginLeft = 12, marginRight = 12, marginBottom = 12, rowspacing = 12) {
row {
label(value = message, hexpand = true, hfill = true)
}
name VARCHAR,
update_interval INT,
max_item_age INT DEFAULT 0,
- item_state_mode INT DEFAULT 0
+ item_state_mode INT DEFAULT 0,
+ add_url_param VARCHAR
)
""".trimIndent())
f.update_interval,
f.item_state_mode,
f.internal_browser,
+ f.add_url_param,
c.unread_count
from groups g
left join feedcollections f on g.group_id = f.group_id
val feedName = rs.getString("feed_name")
val updateInterval = rs.getLong("update_interval")
val internalBrowser = rs.getBoolean("internal_browser")
+ val addUrlParam = rs.getString("add_url_param")
val itemStateMode = rs.getInt("item_state_mode")
val unreadCount = rs.getInt("unread_count")
feed.itemStateMode = itemStateMode
feed.internalBrowser = internalBrowser
feed.unreadItemsCount = unreadCount
+ feed.addUrlParam = addUrlParam
currentGroup.feeds.add(feed)
}
} else {
window.window.ui.unsetState(MainWindow.ITEM_HAS_AUTHOR)
}
- link.set(item.link, item.link)
+ if(!item.link.isNullOrEmpty() && !currentFeed?.addUrlParam.isNullOrEmpty()) {
+ var newurl = item.link
+ if(newurl!!.contains("?")) {
+ newurl += "&${currentFeed?.addUrlParam}"
+ } else {
+ newurl += "?${currentFeed?.addUrlParam}"
+ }
+ link.set(newurl, newurl)
+ } else {
+ link.set(item.link, item.link)
+ }
+
category.setString(item.category ?: "")
if(!item.category.isNullOrEmpty()) {
category.setString(item.category)