Personal noctalia plugins collection

Reduce calendar flicker and widen EDS fetch window

+18 -7
+18 -7
weekly-calendar/Main.qml
··· 15 15 property var overlappingEventsData: ({}) 16 16 property bool isLoading: false 17 17 property bool hasLoadedOnce: false 18 + // Defer UI refresh until CalendarService finishes loading to avoid flicker 19 + property bool pendingEventsUpdate: false 18 20 property string syncStatus: "" 19 21 property int lastKnownEventCount: 0 20 22 ··· 80 82 return 81 83 } 82 84 lastKnownEventCount = Math.max(lastKnownEventCount, count) 83 - Qt.callLater(updateEventsFromService) 85 + if (CalendarService.loading) { 86 + pendingEventsUpdate = true 87 + } else { 88 + Qt.callLater(updateEventsFromService) 89 + } 84 90 } 85 91 function onLoadingChanged() { 86 92 if (!CalendarService.loading && isLoading) { 93 + pendingEventsUpdate = false 94 + Qt.callLater(updateEventsFromService) 95 + } else if (!CalendarService.loading && pendingEventsUpdate) { 96 + pendingEventsUpdate = false 87 97 Qt.callLater(updateEventsFromService) 88 98 } 89 99 } ··· 177 187 } 178 188 179 189 isLoading = true 190 + pendingEventsUpdate = false 180 191 syncStatus = pluginApi.tr("panel.loading") 181 192 182 - // Request a wide range: 180 days behind, 60 days ahead 183 - // This covers ~6 months of past events and ~2 months of future events 184 - var daysAhead = 60 185 - var daysBehind = 180 193 + // Request a wider range: 365 days behind, 365 days ahead 194 + // Covers roughly a full year in both directions so future months stay populated 195 + var daysAhead = 365 196 + var daysBehind = 365 186 197 187 198 CalendarService.loadEvents(daysAhead, daysBehind) 188 199 ··· 239 250 var overlapsWeek = eventStart < weekEndDate && eventEnd > weekStartDate 240 251 241 252 if (overlapsWeek) { 242 - var key = event.uid + "-" + event.start + "-" + event.end + i 253 + var key = event.uid + "-" + event.start + "-" + event.end 243 254 if (eventObj.allDay) { 244 255 if (!uniqueAllDayEvents[key]) { 245 256 uniqueAllDayEvents[key] = true ··· 837 848 "--task-list", taskListUid, "--uid", todoUid, "--action", "delete"] 838 849 updateTodoProcess.running = true 839 850 } 840 - } 851 + }