Add overlay model visibility methods

This commit is contained in:
Arkadiusz Fal
2022-11-17 22:47:45 +01:00
parent daaf2417b7
commit 09de2cbbab
5 changed files with 16 additions and 5 deletions

View File

@@ -195,7 +195,7 @@ struct PlayerControls: View {
guard player.presentingPlayer else { return }
if value == "swipe down", !model.presentingControls, !model.presentingOverlays {
withAnimation(Self.animation) {
controlsOverlayModel.presenting = false
controlsOverlayModel.hide()
}
} else {
model.show()

View File

@@ -367,7 +367,7 @@ struct VideoPlayerView: View {
player.controls.show()
} else if direction == .down, !controlsOverlayModel.presenting, !player.controls.presentingControls {
withAnimation(PlayerControls.animation) {
controlsOverlayModel.presenting = true
controlsOverlayModel.hide()
}
}

View File

@@ -66,7 +66,7 @@ struct ControlsBar: View {
}
} else if detailsToggleFullScreen {
Button {
controlsOverlayModel.presenting = false
controlsOverlayModel.hide()
controls.presentingControls = false
withAnimation {
fullScreen.toggle()