Skip to content

Commit af0f5da

Browse files
committed
Fix #708: Load calendars on fetchEvents if no calendars are loaded
1 parent 06ae8f9 commit af0f5da

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

MeetingBar/AppDelegate.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
423423
@objc
424424
private func fetchEvents() {
425425
DispatchQueue.main.async {
426-
self.statusBarItem.loadEvents()
426+
if self.statusBarItem.calendars.isEmpty, !Defaults[.selectedCalendarIDs].isEmpty {
427+
self.statusBarItem.loadCalendars()
428+
} else {
429+
self.statusBarItem.loadEvents()
430+
}
427431
}
428432
}
429433

0 commit comments

Comments
 (0)