}
}
+ fun markAllAsRead() {
+ GlobalScope.launch(Dispatchers.IO) {
+ Database.updateAllItems(true)
+ GlobalScope.launch(ToolkitDispatcher) {
+ window?.reload()
+ }
+ }
+ }
+
fun initToolbar() {
toolbarItem(name = "reloadFeed", icon = "view-refresh", tooltip = "Refresh current feed") { event ->
syncCurrent()
}
toolbarAppMenu {
+ menuItem(label = "Add Feed") {
+ window?.createFeedDialog()
+ }
+ menuItem(label = "Add Folder") {
+ window?.createCategoryDialog()
+ }
+ separator()
menuItem(label = "Update All") {
syncAll()
}
markCurrentFeedAsRead()
}
menuItem(label = "Mark All as Read") {
- GlobalScope.launch(Dispatchers.IO) {
- Database.updateAllItems(true)
- GlobalScope.launch(ToolkitDispatcher) {
- window?.reload()
- }
- }
+ markAllAsRead()
}
separator()
radioItem(label = "Open item with default settings", varname = "browserSetting")
}
}
- private fun createFeedDialog() {
+ fun createFeedDialog() {
var feedConfig: FeedConfig? = null
val w = dialogWindow(
parent = window.ui,
w.show()
}
- private fun createCategoryDialog() {
+ fun createCategoryDialog() {
var name: UiString? = null
val w = dialogWindow(
parent = window.ui,
- title = "Add Category",
+ title = "Add Folder",
defaultButton = 1,
lbutton1 = "Add",
rbutton4 = "Cancel",