kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Update app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt
Co-authored-by: Stypox <stypox@pm.me>pull/9708/head
rodzic
3c74cb3439
commit
96e9242431
|
@ -196,12 +196,9 @@ class MainPlayerGestureListener(
|
|||
// -- Brightness and Volume control --
|
||||
var isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context)
|
||||
var isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context)
|
||||
var displaySide = DisplayPortion.LEFT_HALF
|
||||
val sidesSwitched = PreferenceManager.getDefaultSharedPreferences(player.context)
|
||||
.getBoolean(R.string.switch_gesture_sides_key.toString(), false)
|
||||
if (sidesSwitched) {
|
||||
displaySide = DisplayPortion.RIGHT_HALF
|
||||
}
|
||||
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) {
|
||||
onScrollBrightness(distanceY)
|
||||
|
|
Ładowanie…
Reference in New Issue