Only periodically refresh in wall-display mode

This commit is contained in:
Adam Goldsmith 2022-10-13 00:56:53 -04:00
parent 1a2d20645f
commit 28edb6027c
2 changed files with 10 additions and 8 deletions

View File

@ -133,11 +133,5 @@ export function main(
calendar.render();
function refresh() {
calendar.refetchEvents();
calendar.today();
}
// refresh data every five minutes
window.setInterval(refresh, 5 * 60 * 1000);
return calendar;
}

View File

@ -31,4 +31,12 @@ const calendarOptions: CalendarOptions = {
: [],
};
main(calendarOptions, !toolFilter);
const calendar = main(calendarOptions, !toolFilter);
function refresh() {
calendar.refetchEvents();
calendar.today();
}
// refresh data every five minutes
window.setInterval(refresh, 5 * 60 * 1000);