update scheduler if there is pending change #2502

This commit is contained in:
MichaelDvP
2025-04-01 12:34:02 +02:00
parent d32378ccd4
commit 856f8efd25

View File

@@ -27,6 +27,7 @@ import {
useLayoutTitle
} from 'components';
import { useI18nContext } from 'i18n/i18n-react';
import { useInterval } from 'utils';
import { readSchedule, writeSchedule } from '../../api/app';
import SettingsSchedulerDialog from './SchedulerDialog';
@@ -73,6 +74,12 @@ const Scheduler = () => {
);
}
useInterval(() => {
if (numChanges === 0) {
void fetchSchedule();
}
});
useEffect(() => {
const formatter = new Intl.DateTimeFormat(locale, {
weekday: 'short',