pull/9708/head
ge78fug 2023-01-20 23:10:55 +01:00 zatwierdzone przez Stypox
rodzic 96e9242431
commit c8d54ec6c7
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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)