Update UI on every resume

This commit is contained in:
antonio 2023-04-03 18:05:38 +02:00
parent c898b5de6b
commit 85df6be5b8

View file

@ -60,6 +60,7 @@ public class PlayerQueueFragment extends Fragment implements ClickCallback {
public void onResume() {
super.onResume();
setMediaBrowserListenableFuture();
updateNowPlayingItem();
}
@Override
@ -150,6 +151,10 @@ public class PlayerQueueFragment extends Fragment implements ClickCallback {
}).attachToRecyclerView(bind.playerQueueRecyclerView);
}
private void updateNowPlayingItem() {
playerSongQueueAdapter.notifyDataSetChanged();
}
@Override
public void onMediaClick(Bundle bundle) {
MediaManager.startQueue(mediaBrowserListenableFuture, bundle.getParcelableArrayList(Constants.TRACKS_OBJECT), bundle.getInt(Constants.ITEM_POSITION));