diff --git a/Clocker/Events and Reminders/CalendarHandler.swift b/Clocker/Events and Reminders/CalendarHandler.swift index 037f07a..f9f7f3b 100644 --- a/Clocker/Events and Reminders/CalendarHandler.swift +++ b/Clocker/Events and Reminders/CalendarHandler.swift @@ -496,8 +496,9 @@ struct EventInfo { let timeSince = Date().timeAgo(since: event.startDate) let withoutAn = timeSince.replacingOccurrences(of: "an", with: CLEmptyString) let withoutAgo = withoutAn.replacingOccurrences(of: "ago", with: CLEmptyString) - - return "in \(withoutAgo.lowercased())" + // If the user has not turned on seconds granularity for one of the timezones, + // we return "in 12 seconds" which looks weird. + return withoutAgo.contains("seconds") ? "starts soon" : "in \(withoutAgo.lowercased())" } else if event.startDate.isTomorrow { let hoursUntil = event.startDate.hoursUntil return "in \(hoursUntil)h" diff --git a/Clocker/Preferences/Menu Bar/StatusItemHandler.swift b/Clocker/Preferences/Menu Bar/StatusItemHandler.swift index 7506508..3ebed0f 100644 --- a/Clocker/Preferences/Menu Bar/StatusItemHandler.swift +++ b/Clocker/Preferences/Menu Bar/StatusItemHandler.swift @@ -251,10 +251,23 @@ class StatusItemHandler: NSObject { } else { let upcomingEventView = retrieveUpcomingEventStatusView() upcomingEventView?.removeFromSuperview() + constructCompactView() // So that Status Container View reclaims the space } // This will internally call `statusItemViewSetNeedsDisplay` on all subviews ensuring all text in the menubar is up-to-date. statusContainerView?.updateTime() } + + private func removeUpcomingStatusItemView() { + NSAnimationContext.runAnimationGroup({ context in + context.duration = 0.2 + let upcomingEventView = retrieveUpcomingEventStatusView() + upcomingEventView?.removeFromSuperview() + }) { [weak self] in + if let sSelf = self { + sSelf.constructCompactView() + } + } + } func refresh() { if currentState == .compactText {