diff --git a/Evergreen/Base.lproj/Main.storyboard b/Evergreen/Base.lproj/Main.storyboard index 0572f3f5f..103387c74 100644 --- a/Evergreen/Base.lproj/Main.storyboard +++ b/Evergreen/Base.lproj/Main.storyboard @@ -1,8 +1,7 @@ - + - - + @@ -412,7 +411,11 @@ - + + + + + diff --git a/Evergreen/Base.lproj/MainWindow.storyboard b/Evergreen/Base.lproj/MainWindow.storyboard index 8da461074..b546d2748 100644 --- a/Evergreen/Base.lproj/MainWindow.storyboard +++ b/Evergreen/Base.lproj/MainWindow.storyboard @@ -141,6 +141,9 @@ + + + diff --git a/Evergreen/MainWindow/MainWindowController.swift b/Evergreen/MainWindow/MainWindowController.swift index 280861277..ceea280a7 100644 --- a/Evergreen/MainWindow/MainWindowController.swift +++ b/Evergreen/MainWindow/MainWindowController.swift @@ -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 { diff --git a/Evergreen/MainWindow/StatusBar/StatusBarView.swift b/Evergreen/MainWindow/StatusBar/StatusBarView.swift index 5486ca3a7..7b6e5c714 100644 --- a/Evergreen/MainWindow/StatusBar/StatusBarView.swift +++ b/Evergreen/MainWindow/StatusBar/StatusBarView.swift @@ -81,9 +81,6 @@ final class StatusBarView: NSView { guard let window = window, let notificationWindow = appInfo.view?.window, window === notificationWindow else { return } - guard let link = appInfo.url else { - return - } mouseoverLink = nil } diff --git a/Evergreen/MainWindow/Timeline/TimelineViewController.swift b/Evergreen/MainWindow/Timeline/TimelineViewController.swift index 2142bab62..dd835cf76 100644 --- a/Evergreen/MainWindow/Timeline/TimelineViewController.swift +++ b/Evergreen/MainWindow/Timeline/TimelineViewController.swift @@ -127,6 +127,11 @@ class TimelineViewController: NSViewController, KeyboardDelegate, UndoableComman return articles.canMarkAllAsRead() } + func canMarkSelectedArticlesAsRead() -> Bool { + + return selectedArticles.canMarkAllAsRead() + } + // MARK: - Actions @objc func openArticleInBrowser(_ sender: AnyObject) { @@ -153,7 +158,7 @@ class TimelineViewController: NSViewController, KeyboardDelegate, UndoableComman } } - @IBAction func markSelectedArticlesAsRead(_ sender: AnyObject) { + @IBAction func markSelectedArticlesAsRead(_ sender: AnyObject?) { guard let undoManager = undoManager, let markReadCommand = MarkReadOrUnreadCommand(initialArticles: selectedArticles, markingRead: true, undoManager: undoManager) else { return