[Android] Scroll to the position of the current song, even if hidden or collapsed.

Robert Stone git at videolan.org
Thu Aug 5 06:31:29 UTC 2021


vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Wed Jul 28 22:39:35 2021 -0700| [73bf16bd3343f6e4b7260ced903bbe12572de3ad] | committer: Nicolas Pomepuy

Scroll to the position of the current song, even if hidden or collapsed.

> https://code.videolan.org/videolan/vlc-android/commit/73bf16bd3343f6e4b7260ced903bbe12572de3ad
---

 application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 2e1f789a5..a0f22631a 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -416,9 +416,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
     fun shouldHidePlayProgress() = abRepeatAddMarker.visibility != View.GONE || (::bookmarkListDelegate.isInitialized && bookmarkListDelegate.visible) || playlistModel.medias?.size ?: 0 < 2
 
     override fun onSelectionSet(position: Int) {
-        if (playerState != BottomSheetBehavior.STATE_COLLAPSED && playerState != BottomSheetBehavior.STATE_HIDDEN) {
-            binding.songsList.scrollToPosition(position)
-        }
+        binding.songsList.scrollToPosition(position)
     }
 
     override fun playItem(position: Int, item: MediaWrapper) {



More information about the Android mailing list