Skip to content

Commit

Permalink
"Started +0s" => "Started"
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Aug 13, 2022
1 parent 45e1189 commit 59ac7dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Clocker/Events and Reminders/CalendarHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand Down
7 changes: 5 additions & 2 deletions Clocker/Preferences/Menu Bar/StatusItemHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 59ac7dc

Please sign in to comment.