refactor: time-to-end always updates (#739)

This commit is contained in:
Carlos Valente
2024-01-30 12:35:54 +01:00
committed by GitHub
parent 3c83f4d15b
commit 39711c1edd
+4
View File
@@ -394,6 +394,10 @@ export const stateMutations = {
const result = play();
_shouldNotify = true;
_isFinished = result.isFinished;
} else if (state.eventNow?.timerType === TimerType.TimeToEnd) {
// or if we are in a time-to-end timer
state.timer.current = getCurrent(state);
state.timer.duration = state.timer.current;
}
// we only update the store at the updateInterval