Skip to content

Commit

Permalink
Fix #708: Load calendars on fetchEvents if no calendars are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
leits committed Jun 25, 2024
1 parent 06ae8f9 commit af0f5da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MeetingBar/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
@objc
private func fetchEvents() {
DispatchQueue.main.async {
self.statusBarItem.loadEvents()
if self.statusBarItem.calendars.isEmpty, !Defaults[.selectedCalendarIDs].isEmpty {
self.statusBarItem.loadCalendars()
} else {
self.statusBarItem.loadEvents()
}
}
}

Expand Down

0 comments on commit af0f5da

Please sign in to comment.