Only periodically refresh in wall-display mode

This commit is contained in:
Adam Goldsmith 2022-10-13 00:56:53 -04:00
parent 730776620a
commit 3a221a0e93
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);