Browse Source

"Started +0s" => "Started"

pull/113/head
Abhishek 2 years ago
parent
commit
59ac7dc324
  1. 2
      Clocker/Events and Reminders/CalendarHandler.swift
  2. 7
      Clocker/Preferences/Menu Bar/StatusItemHandler.swift

2
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)."

7
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
}

Loading…
Cancel
Save