mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
implement scroll to currently playing feature
This commit is contained in:
parent
611b5001be
commit
4d1d953a3a
1 changed files with 8 additions and 0 deletions
|
|
@ -72,6 +72,14 @@ public class PlayerQueueFragment extends Fragment implements ClickCallback {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
setMediaBrowserListenableFuture();
|
setMediaBrowserListenableFuture();
|
||||||
updateNowPlayingItem();
|
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
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue