This commit is contained in:
Trey t
2023-07-24 11:22:29 -05:00
parent 2753e31f24
commit 2dcd260887
12 changed files with 298 additions and 150 deletions

View File

@@ -133,12 +133,8 @@ class BridgeModule: NSObject, ObservableObject {
if currentExerciseTimeLeft > 0 {
currentExerciseTimeLeft -= 1
if currentExerciseTimeLeft == 0 {
playFinished()
} else {
if currentExerciseTimeLeft <= 3 {
playBeep()
}
if currentExerciseTimeLeft <= 3 {
playBeep()
}
sendCurrentExerciseToWatch()
} else {
@@ -158,6 +154,7 @@ class BridgeModule: NSObject, ObservableObject {
func nextExercise() {
if let nextSupersetExercise = currentExerciseInfo.nextExercise {
updateCurrent(exercise: nextSupersetExercise)
playFinished()
} else {
completeWorkout()
}
@@ -196,6 +193,7 @@ class BridgeModule: NSObject, ObservableObject {
func completeWorkout() {
self.currentExerciseTimer?.invalidate()
self.currentExerciseTimer = nil
self.isInWorkout = false
workoutEndDate = Date()