From c8d54ec6c77d172bf51dc5d6988aee953375bc6e Mon Sep 17 00:00:00 2001 From: ge78fug Date: Fri, 20 Jan 2023 23:10:55 +0100 Subject: [PATCH] Changed to val --- .../newpipe/player/gesture/MainPlayerGestureListener.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt b/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt index d6dc37e95..3c40f714e 100644 --- a/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt +++ b/app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt @@ -194,13 +194,13 @@ class MainPlayerGestureListener( isMoving = true // -- Brightness and Volume control -- - var isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context) - var isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context) + val isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context) + val isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context) val brightnessSide = if (PreferenceManager.getDefaultSharedPreferences(player.context) .getBoolean(R.string.switch_gesture_sides_key.toString(), false)) DisplayPortion.RIGHT_HALF else DisplayPortion.LEFT_HALF if (isBrightnessGestureEnabled && isVolumeGestureEnabled) { - if (getDisplayHalfPortion(initialEvent) === displaySide) { + if (getDisplayHalfPortion(initialEvent) === brightnessSide) { onScrollBrightness(distanceY) } else /* DisplayPortion.RIGHT_HALF */ { onScrollVolume(distanceY)