WIP
This commit is contained in:
@@ -74,7 +74,6 @@ struct WorkoutDetailView: View {
|
||||
dismiss()
|
||||
})
|
||||
}
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
}
|
||||
.onChange(of: bridgeModule.currentExercise, perform: { newValue in
|
||||
@@ -96,6 +95,24 @@ struct WorkoutDetailView: View {
|
||||
}
|
||||
})
|
||||
.onAppear{
|
||||
var _url: URL?
|
||||
if let currentExercise = bridgeModule.currentExercise {
|
||||
if showNSFWVideos {
|
||||
let viddd = currentExercise.exercise.nsfwVideoURL
|
||||
if let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||
_url = url
|
||||
}
|
||||
} else {
|
||||
let viddd = currentExercise.exercise.videoURL
|
||||
if let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||
_url = url
|
||||
}
|
||||
}
|
||||
if let __url = _url {
|
||||
avPlayer = AVPlayer(url: __url)
|
||||
avPlayer.play()
|
||||
}
|
||||
}
|
||||
bridgeModule.completedWorkout = {
|
||||
if let workoutData = createWorkoutData() {
|
||||
presentedSheet = .completedWorkout(workoutData)
|
||||
|
||||
Reference in New Issue
Block a user