WIP
This commit is contained in:
@@ -21,6 +21,8 @@ class BridgeModule: ObservableObject {
|
||||
@Published var currentWorkoutRunTimeInSeconds: Int = -1
|
||||
private var currentWorkoutRunTimer: Timer?
|
||||
|
||||
@Published var isInWorkout = false
|
||||
|
||||
func start(workout: Workout, atExerciseIndex: Int = 0) {
|
||||
self.currentWorkout = workout
|
||||
currentWorkoutRunTimeInSeconds = 0
|
||||
@@ -31,6 +33,7 @@ class BridgeModule: ObservableObject {
|
||||
let exercise = workout.exercises[currentExerciseIdx]
|
||||
updateCurrent(exercise: exercise)
|
||||
startWorkoutTimer()
|
||||
isInWorkout = true
|
||||
}
|
||||
|
||||
func completeWorkout() {
|
||||
@@ -46,6 +49,8 @@ class BridgeModule: ObservableObject {
|
||||
|
||||
currentExercise = nil
|
||||
currentWorkout = nil
|
||||
|
||||
isInWorkout = false
|
||||
}
|
||||
|
||||
private func startWorkoutTimer() {
|
||||
|
||||
Reference in New Issue
Block a user