Updated the gesture-switch-toggle

This commit is contained in:
ge78fug 2023-01-21 17:11:45 +01:00 committed by Stypox
parent c8d54ec6c7
commit 2ba649949f
3 changed files with 24 additions and 22 deletions

View file

@ -197,8 +197,9 @@ class MainPlayerGestureListener(
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
.getBoolean(R.string.switch_gesture_sides_key.toString(), false)
) DisplayPortion.RIGHT_HALF
else DisplayPortion.LEFT_HALF
if (isBrightnessGestureEnabled && isVolumeGestureEnabled) {
if (getDisplayHalfPortion(initialEvent) === brightnessSide) {
onScrollBrightness(distanceY)