fix: countToEnd should not override display options

This commit is contained in:
arc-alex
2025-11-27 09:12:37 +01:00
committed by Carlos Valente
parent 9a5d50d933
commit 8e93b0af25
3 changed files with 2 additions and 10 deletions
@@ -11,7 +11,6 @@ import { formatTime } from '../../../common/utils/time';
export function getTimerByType(
freezeEnd: boolean,
timerTypeNow: TimerType,
countToEndNow: boolean,
clock: number,
timerObject: Pick<TimerState, 'current' | 'elapsed'>,
timerTypeOverride?: TimerType,
@@ -22,13 +21,6 @@ export function getTimerByType(
const viewTimerType = timerTypeOverride ?? timerTypeNow;
if (countToEndNow) {
if (timerObject.current === null) {
return null;
}
return freezeEnd ? Math.max(timerObject.current, 0) : timerObject.current;
}
switch (viewTimerType) {
case TimerType.CountDown:
if (timerObject.current === null) {