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:
@@ -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 = ""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user