implement scroll to currently playing feature

This commit is contained in:
observer 2025-11-09 16:03:02 +00:00
parent 611b5001be
commit 4d1d953a3a
No known key found for this signature in database
GPG key ID: 2DE1FE56348E60D0

View file

@ -72,6 +72,14 @@ public class PlayerQueueFragment extends Fragment implements ClickCallback {
super.onResume();
setMediaBrowserListenableFuture();
updateNowPlayingItem();
try {
long position = mediaBrowserListenableFuture.get().getCurrentMediaItemIndex();
// hopefully this cast dont bite us in the arse hehe
bind.playerQueueRecyclerView.scrollToPosition((int) position);
} catch (Exception e) {
//dont worry about it
e.printStackTrace();
}
}
@Override