feat: Add toggle for calendar event display

This commit is contained in:
loner
2025-10-21 20:33:39 +08:00
parent 95faefa8eb
commit dea916617a
5 changed files with 24 additions and 2 deletions
+10 -1
View File
@@ -92,7 +92,11 @@ Singleton {
// Core functions
function checkAvailability() {
availabilityCheckProcess.running = true
if (Settings.data.location.showCalendarEvents) {
availabilityCheckProcess.running = true
} else {
root.available = false
}
}
function loadCalendars() {
@@ -100,6 +104,11 @@ Singleton {
}
function loadEvents(daysAhead = 31, daysBehind = 14) {
if (!Settings.data.location.showCalendarEvents) {
root.loading = false
root.events = []
return
}
if (loading)
return