Mark Read command now works.

This commit is contained in:
Brent Simmons
2017-11-05 21:27:34 -08:00
parent 11aa68fd6f
commit a7464daf15
5 changed files with 31 additions and 9 deletions

View File

@@ -101,7 +101,11 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
if item.action == #selector(markAllAsRead(_:)) {
return canMarkAllAsRead()
}
if item.action == #selector(markRead(_:)) {
return canMarkRead()
}
return true
}
@@ -139,6 +143,11 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
timelineViewController?.markAllAsRead()
}
@IBAction func markRead(_ sender: AnyObject?) {
timelineViewController?.markSelectedArticlesAsRead(sender!)
}
@IBAction func toggleSidebar(_ sender: AnyObject?) {
@@ -218,6 +227,11 @@ private extension MainWindowController {
return timelineViewController?.canMarkAllAsRead() ?? false
}
func canMarkRead() -> Bool {
return timelineViewController?.canMarkSelectedArticlesAsRead() ?? false
}
func updateWindowTitle() {
if unreadCount < 1 {