Browse Source

Exclude events past their 5 minutes mark.

pull/113/head
Abhishek 3 years ago
parent
commit
de044b3360
  1. 2
      Clocker/Events and Reminders/CalendarHandler.swift

2
Clocker/Events and Reminders/CalendarHandler.swift

@ -124,7 +124,7 @@ extension EventCenter {
let relevantEvents = filteredEvents[autoupdatingCalendar.startOfDay(for: Date())] ?? []
let filteredEvents = relevantEvents.filter {
$0.event.isAllDay == false && $0.event.endDate.timeIntervalSinceNow > 0
$0.event.isAllDay == false && $0.event.endDate.timeIntervalSinceNow > 0 && $0.event.startDate.timeIntervalSinceNow > -300
}
if filteredEvents.count == 1 { return filteredEvents.first }

Loading…
Cancel
Save