refactor: hide progress bar in timer none

This commit is contained in:
Carlos Valente
2024-11-07 21:32:20 +01:00
committed by Carlos Valente
parent 597be4e710
commit f574fdbc02
@@ -116,7 +116,11 @@ export default function Timer(props: TimerProps) {
const shouldShowModifiers = time.timerType === TimerType.CountDown || time.timerType === TimerType.TimeToEnd;
const showEndMessage = shouldShowModifiers && finished && viewSettings.endMessage;
const showProgress = time.playback !== Playback.Stop;
const showProgress =
eventNow !== null &&
time.timerType !== TimerType.None &&
time.timerType !== TimerType.Clock &&
time.playback !== Playback.Stop;
const showFinished = shouldShowModifiers && finished && (shouldShowModifiers || showEndMessage);
const showWarning = shouldShowModifiers && time.phase === TimerPhase.Warning;
const showDanger = shouldShowModifiers && time.phase === TimerPhase.Danger;