mirror of
https://github.com/yattee/yattee.git
synced 2025-08-04 01:34:10 +00:00
Add overlay model visibility methods
This commit is contained in:
@@ -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()
|
||||
|
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -66,7 +66,7 @@ struct ControlsBar: View {
|
||||
}
|
||||
} else if detailsToggleFullScreen {
|
||||
Button {
|
||||
controlsOverlayModel.presenting = false
|
||||
controlsOverlayModel.hide()
|
||||
controls.presentingControls = false
|
||||
withAnimation {
|
||||
fullScreen.toggle()
|
||||
|
Reference in New Issue
Block a user