Fix bugs related to skipping back in active timer

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2020-11-04 07:50:27 -07:00
parent 72ae2b2372
commit 0bd30467dc

View file

@ -64,7 +64,7 @@ class TimerDataStore: ObservableObject {
} else if state.currentSet == state.timer.sets && state.currentRound < state.timer.rounds {
self.activeTimer = state.copy(
timeRemaining: state.timer.restDuration,
currentRound: state.timer.rounds + 1,
currentSet: 1,
phase: .rest
)
} else {
@ -82,6 +82,7 @@ class TimerDataStore: ObservableObject {
case .rest:
self.activeTimer = state.copy(
timeRemaining: state.timer.highIntensityDuration,
currentRound: state.currentRound + 1,
phase: .high
)
case .cooldown: