mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-21 18:42:35 +01:00
Changed the naming
This commit is contained in:
parent
72ca52a29b
commit
32cec6c9a7
@ -2013,9 +2013,9 @@ public final class VideoDetailFragment
|
||||
restoreDefaultBrightness();
|
||||
} else {
|
||||
// Do not restore if user has disabled brightness gesture
|
||||
if (PlayerHelper.getRightSideGesture(activity)
|
||||
if (PlayerHelper.getActionForRightGestureSide(activity)
|
||||
.equals(getString(R.string.brightness_control_key))
|
||||
|| PlayerHelper.getLeftSideGesture(activity)
|
||||
|| PlayerHelper.getActionForLeftGestureSide(activity)
|
||||
.equals(getString(R.string.brightness_control_key))) {
|
||||
return;
|
||||
}
|
||||
|
@ -193,18 +193,15 @@ class MainPlayerGestureListener(
|
||||
isMoving = true
|
||||
|
||||
// -- Brightness and Volume control --
|
||||
val rightSide = PlayerHelper.getRightSideGesture(player.context)
|
||||
val leftSide = PlayerHelper.getLeftSideGesture(player.context)
|
||||
|
||||
if (getDisplayHalfPortion(initialEvent) == DisplayPortion.RIGHT_HALF) {
|
||||
when (rightSide) {
|
||||
when (PlayerHelper.getActionForRightGestureSide(player.context)) {
|
||||
player.context.getString(R.string.volume_control_key) ->
|
||||
onScrollVolume(distanceY)
|
||||
player.context.getString(R.string.brightness_control_key) ->
|
||||
onScrollBrightness(distanceY)
|
||||
}
|
||||
} else {
|
||||
when (leftSide) {
|
||||
when (PlayerHelper.getActionForLeftGestureSide(player.context)) {
|
||||
player.context.getString(R.string.volume_control_key) ->
|
||||
onScrollVolume(distanceY)
|
||||
player.context.getString(R.string.brightness_control_key) ->
|
||||
|
@ -228,13 +228,13 @@ public final class PlayerHelper {
|
||||
.getBoolean(context.getString(R.string.resume_on_audio_focus_gain_key), false);
|
||||
}
|
||||
|
||||
public static String getRightSideGesture(@NonNull final Context context) {
|
||||
public static String getActionForRightGestureSide(@NonNull final Context context) {
|
||||
return getPreferences(context)
|
||||
.getString(context.getString(R.string.right_gesture_control_key),
|
||||
context.getString(R.string.default_right_gesture_control_value));
|
||||
}
|
||||
|
||||
public static String getLeftSideGesture(@NonNull final Context context) {
|
||||
public static String getActionForLeftGestureSide(@NonNull final Context context) {
|
||||
return getPreferences(context)
|
||||
.getString(context.getString(R.string.left_gesture_control_key),
|
||||
context.getString(R.string.default_left_gesture_control_value));
|
||||
|
Loading…
Reference in New Issue
Block a user