diff --git a/Clocker/Events and Reminders/CalendarHandler.swift b/Clocker/Events and Reminders/CalendarHandler.swift index 4019ee4..ab124f7 100644 --- a/Clocker/Events and Reminders/CalendarHandler.swift +++ b/Clocker/Events and Reminders/CalendarHandler.swift @@ -448,7 +448,7 @@ struct EventInfo { func metadataForMeeting() -> String { let timeIntervalSinceNowForMeeting = event.startDate.timeIntervalSinceNow - if timeIntervalSinceNowForMeeting == 0 { + if timeIntervalSinceNowForMeeting == 0 || event.startDate.shortTimeAgoSinceNow == "0s" { return "started." } else if timeIntervalSinceNowForMeeting < 0, timeIntervalSinceNowForMeeting > -300 { return "started +\(event.startDate.shortTimeAgoSinceNow)." diff --git a/Clocker/Preferences/Menu Bar/StatusItemHandler.swift b/Clocker/Preferences/Menu Bar/StatusItemHandler.swift index d07f564..f6a8cfe 100644 --- a/Clocker/Preferences/Menu Bar/StatusItemHandler.swift +++ b/Clocker/Preferences/Menu Bar/StatusItemHandler.swift @@ -247,14 +247,17 @@ class StatusItemHandler: NSObject { func updateCompactMenubar() { let filteredEvents = EventCenter.sharedCenter().filteredEvents let calendar = EventCenter.sharedCenter().autoupdatingCalendar - if menubarTitleHandler.checkForUpcomingEvents(filteredEvents, calendar: calendar) != nil { + let upcomingEvent = menubarTitleHandler.checkForUpcomingEvents(filteredEvents, calendar: calendar) + if upcomingEvent != nil { // Iterate and see if we're showing the calendar item view let upcomingEventView = retrieveUpcomingEventStatusView() // If not, reconstruct Status Container View with another view if upcomingEventView == nil { constructCompactView(with: true) } - } else if let upcomingEventView = retrieveUpcomingEventStatusView() { + } + + if let upcomingEventView = retrieveUpcomingEventStatusView(), upcomingEvent == nil { upcomingEventView.removeFromSuperview() constructCompactView() // So that Status Container View reclaims the space }