From aaf051a010678bbf05f62d134bc3abfbc59c6881 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 11 Jul 2022 20:15:48 +0200 Subject: [PATCH] Fix player gesture --- Shared/Player/VideoPlayerView.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Shared/Player/VideoPlayerView.swift b/Shared/Player/VideoPlayerView.swift index 3f7eddce..e5685e92 100644 --- a/Shared/Player/VideoPlayerView.swift +++ b/Shared/Player/VideoPlayerView.swift @@ -213,7 +213,7 @@ struct VideoPlayerView: View { hovering ? playerControls.show() : playerControls.hide() } #if os(iOS) - .gesture(isPlayerDragGestureEnabled ? playerDragGesture : nil) + .gesture(playerControls.presentingOverlays ? nil : playerDragGesture) #elseif os(macOS) .onAppear(perform: { NSEvent.addLocalMonitorForEvents(matching: [.mouseMoved]) { @@ -361,10 +361,6 @@ struct VideoPlayerView: View { } } - var isPlayerDragGestureEnabled: Bool { - !player.controls.presentingDetailsOverlay && !player.controls.presentingDetailsOverlay - } - var controlsTopPadding: Double { guard fullScreenLayout else { return 0 }