Don't debounce the agenda query in the clock widget
`CalendarRepository.findMany` holds every result back by 500 ms, which was added for the calendar widget to collapse bursts of plugin and permission changes. `debounce` delays the first result too, so the agenda part - whose ranking stays 0 until the first result arrives - only appeared half a second after the clock and the other parts. The agenda is re-queried on a calendar change or every 15 minutes, so it does not need the debounce. Make the delay a parameter (still 500 ms by default) and pass 0 from `CalendarPartProvider`.
This commit is contained in:
@@ -122,6 +122,10 @@ class CalendarPartProvider : PartProvider, KoinComponent {
|
||||
from = now,
|
||||
to = endOfDay(now),
|
||||
excludeCalendars = excludedCalendars.toList(),
|
||||
// No debounce: the ranking stays 0 until the first result arrives, and
|
||||
// the query is only re-run on a calendar change or every 15 minutes, so
|
||||
// holding the result back would only delay the part's appearance.
|
||||
debounceMillis = 0,
|
||||
).first()
|
||||
.filter { !it.isTask }
|
||||
.sortedBy { it.startTime ?: it.endTime }
|
||||
|
||||
Reference in New Issue
Block a user