fix(macos): drop status item title while notch overlay is visible

The notch overlay wings already display elapsed time and step title;
keeping them on the status item too produced a duplicate readout
elsewhere in the menu bar.
This commit is contained in:
Julien Calixte
2026-05-15 14:41:30 +02:00
parent fe75df4e0e
commit 2a4a3ed9f7
2 changed files with 8 additions and 2 deletions

View File

@@ -104,8 +104,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
let elapsed = clock.now.timeIntervalSince(range.start)
let icon = active.record.isPaused ? "pause.circle.fill" : "record.circle"
button.image = NSImage(systemSymbolName: icon, accessibilityDescription: nil)
let title = "\(TimeFormat.clock(elapsed)) \(step.title)"
button.title = title.count > 32 ? "\(title.prefix(30))" : title
if notchOverlay?.isShowing == true {
button.title = ""
} else {
let title = "\(TimeFormat.clock(elapsed)) \(step.title)"
button.title = title.count > 32 ? "\(title.prefix(30))" : title
}
} else {
button.image = NSImage(systemSymbolName: "checklist", accessibilityDescription: nil)
button.title = ""

View File

@@ -29,6 +29,8 @@ final class NotchOverlayController {
private var screenObserver: NSObjectProtocol?
private var syncTask: Task<Void, Never>?
var isShowing: Bool { panel != nil }
init(store: AppStore, clock: Clock) {
self.store = store
self.clock = clock