mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 00:20:32 +00:00
Update app/src/main/java/org/schabi/newpipe/player/gesture/MainPlayerGestureListener.kt
Co-authored-by: Stypox <stypox@pm.me>
This commit is contained in:
parent
3c74cb3439
commit
96e9242431
@ -196,12 +196,9 @@ class MainPlayerGestureListener(
|
|||||||
// -- Brightness and Volume control --
|
// -- Brightness and Volume control --
|
||||||
var isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context)
|
var isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context)
|
||||||
var isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context)
|
var isVolumeGestureEnabled = PlayerHelper.isVolumeGestureEnabled(player.context)
|
||||||
var displaySide = DisplayPortion.LEFT_HALF
|
val brightnessSide = if (PreferenceManager.getDefaultSharedPreferences(player.context)
|
||||||
val sidesSwitched = PreferenceManager.getDefaultSharedPreferences(player.context)
|
.getBoolean(R.string.switch_gesture_sides_key.toString(), false)) DisplayPortion.RIGHT_HALF
|
||||||
.getBoolean(R.string.switch_gesture_sides_key.toString(), false)
|
else DisplayPortion.LEFT_HALF
|
||||||
if (sidesSwitched) {
|
|
||||||
displaySide = DisplayPortion.RIGHT_HALF
|
|
||||||
}
|
|
||||||
if (isBrightnessGestureEnabled && isVolumeGestureEnabled) {
|
if (isBrightnessGestureEnabled && isVolumeGestureEnabled) {
|
||||||
if (getDisplayHalfPortion(initialEvent) === displaySide) {
|
if (getDisplayHalfPortion(initialEvent) === displaySide) {
|
||||||
onScrollBrightness(distanceY)
|
onScrollBrightness(distanceY)
|
||||||
|
Loading…
Reference in New Issue
Block a user