Minor improvements

This commit is contained in:
Arkadiusz Fal
2022-02-21 21:57:12 +01:00
parent 2a38408f04
commit 76857e5eb6
7 changed files with 393 additions and 108 deletions

View File

@@ -52,8 +52,9 @@ final class PlayerControlsModel: ObservableObject {
}
func show() {
player.backend.updateControls()
withAnimation(PlayerControls.animation) {
player.backend.updateControls()
presentingControls = true
}
}
@@ -65,11 +66,11 @@ final class PlayerControlsModel: ObservableObject {
}
func toggle() {
withAnimation(PlayerControls.animation) {
if !presentingControls {
player.backend.updateControls()
}
if !presentingControls {
player.backend.updateControls()
}
withAnimation(PlayerControls.animation) {
presentingControls.toggle()
}
}

View File

@@ -300,6 +300,9 @@ final class PlayerModel: ObservableObject {
}
private func handleNavigationViewPlayerPresentationChange() {
backend.setNeedsDrawing(playerNavigationLinkActive)
controls.hide()
if pauseOnHidingPlayer, !playingInPictureInPicture, !playerNavigationLinkActive {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.pause()