From a6f8041c9e31cd831009445f853d3b4a2f916f2d Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Sat, 9 May 2026 01:02:13 +0530 Subject: [PATCH] fix: volume/brightness gesture triggering when hold to speed is active Fixes #992 --- .../kotlin/com/nuvio/app/features/player/PlayerScreen.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerScreen.kt index fc24fba4..785ecb6a 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerScreen.kt @@ -1449,12 +1449,15 @@ fun PlayerScreen( totalDy += delta.y if (gestureMode == null) { + val holdToSpeedActive = isHoldToSpeedGestureActiveState.value val horizontalDominant = - !isHoldToSpeedGestureActiveState.value && + !holdToSpeedActive && abs(totalDx) > viewConfiguration.touchSlop && abs(totalDx) > abs(totalDy) val verticalDominant = - abs(totalDy) > viewConfiguration.touchSlop && abs(totalDy) > abs(totalDx) + !holdToSpeedActive && + abs(totalDy) > viewConfiguration.touchSlop && + abs(totalDy) > abs(totalDx) gestureMode = when { horizontalDominant -> {