split files up, fix complete workout screen not showing if remove workout details screen
This commit is contained in:
@@ -172,6 +172,14 @@ struct WorkoutDetailView: View {
|
||||
avPlayer.play()
|
||||
}
|
||||
}
|
||||
|
||||
bridgeModule.completedWorkout = {
|
||||
if let workoutData = createWorkoutData() {
|
||||
workoutComplete = .completedWorkout(workoutData)
|
||||
} else {
|
||||
bridgeModule.resetCurrentWorkout()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(
|
||||
for: UIScene.willEnterForegroundNotification)) { _ in
|
||||
@@ -194,14 +202,6 @@ struct WorkoutDetailView: View {
|
||||
}
|
||||
|
||||
func startWorkout(workout: Workout) {
|
||||
bridgeModule.completedWorkout = {
|
||||
if let workoutData = createWorkoutData() {
|
||||
workoutComplete = .completedWorkout(workoutData)
|
||||
} else {
|
||||
bridgeModule.resetCurrentWorkout()
|
||||
}
|
||||
}
|
||||
|
||||
bridgeModule.start(workout: workout)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user