Fixed a bug

This commit is contained in:
ge78fug 2023-01-23 21:25:05 +01:00 committed by Stypox
parent 2ba649949f
commit 759a9080a8

View file

@ -197,11 +197,12 @@ class MainPlayerGestureListener(
val isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context) val isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context)
val isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context) val isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context)
val brightnessSide = if (PreferenceManager.getDefaultSharedPreferences(player.context) val brightnessSide = if (PreferenceManager.getDefaultSharedPreferences(player.context)
.getBoolean(R.string.switch_gesture_sides_key.toString(), false) .getBoolean(
) DisplayPortion.RIGHT_HALF player.context.getString(R.string.switch_gesture_sides_key), false))
DisplayPortion.RIGHT_HALF
else DisplayPortion.LEFT_HALF else DisplayPortion.LEFT_HALF
if (isBrightnessGestureEnabled && isVolumeGestureEnabled) { if (isBrightnessGestureEnabled && isVolumeGestureEnabled) {
if (getDisplayHalfPortion(initialEvent) === brightnessSide) { if (getDisplayHalfPortion(initialEvent) == brightnessSide) {
onScrollBrightness(distanceY) onScrollBrightness(distanceY)
} else /* DisplayPortion.RIGHT_HALF */ { } else /* DisplayPortion.RIGHT_HALF */ {
onScrollVolume(distanceY) onScrollVolume(distanceY)