From be578c6feb399b4eec5a6dda83049eb0913041f6 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 21 Oct 2026 21:03:43 -0700 Subject: [PATCH] Open the Current Activity window when the progress indicator in the status bar is clicked (as in NetNewsWire of Yore). --- .../StatusBar/MainWindowStatusBarView.swift | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Mac/MainWindow/StatusBar/MainWindowStatusBarView.swift b/Mac/MainWindow/StatusBar/MainWindowStatusBarView.swift index 1691fc44e..4a5fd0f6e 100644 --- a/Mac/MainWindow/StatusBar/MainWindowStatusBarView.swift +++ b/Mac/MainWindow/StatusBar/MainWindowStatusBarView.swift @@ -251,8 +251,17 @@ final class MainWindowStatusBarView: NSView { URLPasteboardWriter.write(urlStrings: [link], to: .general) } - @objc func toggleCountMode(_ sender: Any?) { - AppDefaults.shared.statusBarCountMode = effectiveCountMode.next(includingUnreadCount: Self.showsUnreadCounts) + /// While refreshing, the label shows progress, and a click opens the Current Activity window. Otherwise a click toggles the count mode. + @objc func countLabelClicked(_ sender: Any?) { + if CombinedRefreshProgress.shared.progressInfo.isComplete { + AppDefaults.shared.statusBarCountMode = effectiveCountMode.next(includingUnreadCount: Self.showsUnreadCounts) + } else { + showActivityWindow(sender) + } + } + + @objc func showActivityWindow(_ sender: Any?) { + NSApp.sendAction(#selector(AppDelegate.showActivityWindow(_:)), to: nil, from: self) } } @@ -316,7 +325,8 @@ private extension MainWindowStatusBarView { progressIndicator.isHidden = true countLabel.isHidden = true - countLabel.addGestureRecognizer(NSClickGestureRecognizer(target: self, action: #selector(toggleCountMode(_:)))) + progressIndicator.addGestureRecognizer(NSClickGestureRecognizer(target: self, action: #selector(showActivityWindow(_:)))) + countLabel.addGestureRecognizer(NSClickGestureRecognizer(target: self, action: #selector(countLabelClicked(_:)))) linkLabel.menu = makeLinkMenu()