Stabilize iOS/watchOS/tvOS apps and add cross-platform audit remediation
This commit is contained in:
@@ -54,6 +54,9 @@ extension BridgeModule {
|
||||
}
|
||||
|
||||
func completeWorkout() {
|
||||
if isInWorkout {
|
||||
sendWorkoutCompleteToWatch()
|
||||
}
|
||||
self.currentExerciseTimer?.invalidate()
|
||||
self.currentExerciseTimer = nil
|
||||
self.isInWorkout = false
|
||||
@@ -67,10 +70,7 @@ extension BridgeModule {
|
||||
}
|
||||
|
||||
func start(workout: Workout) {
|
||||
currentWorkoutInfo.complete = {
|
||||
self.completeWorkout()
|
||||
}
|
||||
|
||||
lastSentInExercisePayload = nil
|
||||
currentWorkoutInfo.start(workout: workout)
|
||||
currentWorkoutRunTimeInSeconds = 0
|
||||
currentWorkoutRunTimer?.invalidate()
|
||||
@@ -97,9 +97,6 @@ extension BridgeModule {
|
||||
|
||||
func resetCurrentWorkout() {
|
||||
DispatchQueue.main.async {
|
||||
if self.isInWorkout {
|
||||
self.sendWorkoutCompleteToWatch()
|
||||
}
|
||||
self.currentWorkoutRunTimeInSeconds = 0
|
||||
self.currentWorkoutRunTimer?.invalidate()
|
||||
self.currentWorkoutRunTimer = nil
|
||||
@@ -109,6 +106,7 @@ extension BridgeModule {
|
||||
|
||||
self.currentWorkoutRunTimeInSeconds = -1
|
||||
self.currentWorkoutInfo.reset()
|
||||
self.lastSentInExercisePayload = nil
|
||||
|
||||
self.isInWorkout = false
|
||||
self.workoutStartDate = nil
|
||||
|
||||
Reference in New Issue
Block a user