WIP
fix naming on variable fix tapping on exercise not updating external correctly
This commit is contained in:
@@ -23,7 +23,7 @@ struct ExerciseListView: View {
|
||||
gender: thotGenderOption,
|
||||
defaultVideoURLStr: self.videoExercise?.videoURL,
|
||||
exerciseName: self.videoExercise?.name,
|
||||
workout: bridgeModule.currentExerciseInfo.workout) {
|
||||
workout: bridgeModule.currentWorkoutInfo.workout) {
|
||||
avPlayer = AVPlayer(url: videoURL)
|
||||
avPlayer.play()
|
||||
}
|
||||
@@ -42,8 +42,8 @@ struct ExerciseListView: View {
|
||||
VStack {
|
||||
HStack {
|
||||
if bridgeModule.isInWorkout &&
|
||||
supersetIndex == bridgeModule.currentExerciseInfo.supersetIndex &&
|
||||
exerciseIndex == bridgeModule.currentExerciseInfo.exerciseIndex {
|
||||
supersetIndex == bridgeModule.currentWorkoutInfo.supersetIndex &&
|
||||
exerciseIndex == bridgeModule.currentWorkoutInfo.exerciseIndex {
|
||||
Image(systemName: "figure.run")
|
||||
.foregroundColor(Color("appColor"))
|
||||
}
|
||||
@@ -92,15 +92,17 @@ struct ExerciseListView: View {
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
if bridgeModule.isInWorkout {
|
||||
bridgeModule.goToExerciseAt(section: supersetIndex, row: exerciseIndex)
|
||||
bridgeModule.currentWorkoutInfo.goToExerciseAt(
|
||||
supersetIndex: supersetIndex,
|
||||
exerciseIndex: exerciseIndex)
|
||||
} else {
|
||||
videoExercise = supersetExecercise.exercise
|
||||
}
|
||||
}
|
||||
|
||||
if bridgeModule.isInWorkout &&
|
||||
supersetIndex == bridgeModule.currentExerciseInfo.supersetIndex &&
|
||||
exerciseIndex == bridgeModule.currentExerciseInfo.exerciseIndex &&
|
||||
supersetIndex == bridgeModule.currentWorkoutInfo.supersetIndex &&
|
||||
exerciseIndex == bridgeModule.currentWorkoutInfo.exerciseIndex &&
|
||||
showExecersizeInfo {
|
||||
detailView(forExercise: supersetExecercise)
|
||||
}
|
||||
@@ -125,8 +127,8 @@ struct ExerciseListView: View {
|
||||
})
|
||||
}
|
||||
}
|
||||
.onChange(of: bridgeModule.currentExerciseInfo.allSupersetExecerciseIndex, perform: { newValue in
|
||||
if let newCurrentExercise = bridgeModule.currentExerciseInfo.currentExercise {
|
||||
.onChange(of: bridgeModule.currentWorkoutInfo.allSupersetExecerciseIndex, perform: { newValue in
|
||||
if let newCurrentExercise = bridgeModule.currentWorkoutInfo.currentExercise {
|
||||
withAnimation {
|
||||
proxy.scrollTo(newCurrentExercise.id, anchor: .top)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user