mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-26 04:52:29 +01:00
Changed to val
This commit is contained in:
parent
96e9242431
commit
c8d54ec6c7
@ -194,13 +194,13 @@ class MainPlayerGestureListener(
|
|||||||
isMoving = true
|
isMoving = true
|
||||||
|
|
||||||
// -- Brightness and Volume control --
|
// -- Brightness and Volume control --
|
||||||
var isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context)
|
val isBrightnessGestureEnabled = PlayerHelper.isBrightnessGestureEnabled(player.context)
|
||||||
var 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)) DisplayPortion.RIGHT_HALF
|
.getBoolean(R.string.switch_gesture_sides_key.toString(), false)) DisplayPortion.RIGHT_HALF
|
||||||
else DisplayPortion.LEFT_HALF
|
else DisplayPortion.LEFT_HALF
|
||||||
if (isBrightnessGestureEnabled && isVolumeGestureEnabled) {
|
if (isBrightnessGestureEnabled && isVolumeGestureEnabled) {
|
||||||
if (getDisplayHalfPortion(initialEvent) === displaySide) {
|
if (getDisplayHalfPortion(initialEvent) === brightnessSide) {
|
||||||
onScrollBrightness(distanceY)
|
onScrollBrightness(distanceY)
|
||||||
} else /* DisplayPortion.RIGHT_HALF */ {
|
} else /* DisplayPortion.RIGHT_HALF */ {
|
||||||
onScrollVolume(distanceY)
|
onScrollVolume(distanceY)
|
||||||
|
Loading…
Reference in New Issue
Block a user