From ef29f26893d2abb310c15a950118e18be893098e Mon Sep 17 00:00:00 2001 From: Nite Date: Fri, 19 Mar 2021 19:25:34 +0100 Subject: [PATCH] Fixed Next behavior in additional places --- .../org/moire/ultrasonic/fragment/PlayerFragment.java | 9 +++------ .../ultrasonic/service/MediaPlayerLifecycleSupport.java | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java index 0c454557..4f009edc 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/PlayerFragment.java @@ -1501,12 +1501,9 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur if (e1X - e2X > swipeDistance && absX > swipeVelocity) { networkAndStorageChecker.getValue().warnIfNetworkOrStorageUnavailable(); - if (mediaPlayerController.getCurrentPlayingNumberOnPlaylist() < mediaPlayerController.getPlaylistSize() - 1) - { - mediaPlayerController.next(); - onCurrentChanged(); - onSliderProgressChanged(); - } + mediaPlayerController.next(); + onCurrentChanged(); + onSliderProgressChanged(); return true; } diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/service/MediaPlayerLifecycleSupport.java b/ultrasonic/src/main/java/org/moire/ultrasonic/service/MediaPlayerLifecycleSupport.java index aea69afa..2e4d6984 100644 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/service/MediaPlayerLifecycleSupport.java +++ b/ultrasonic/src/main/java/org/moire/ultrasonic/service/MediaPlayerLifecycleSupport.java @@ -221,10 +221,7 @@ public class MediaPlayerLifecycleSupport mediaPlayerController.previous(); break; case KeyEvent.KEYCODE_MEDIA_NEXT: - if (downloader.getCurrentPlayingIndex() < downloader.downloadList.size() - 1) - { - mediaPlayerController.next(); - } + mediaPlayerController.next(); break; case KeyEvent.KEYCODE_MEDIA_STOP: mediaPlayerController.stop();