Remove Details option in Main Player Queue menu

This commit is contained in:
ktprograms 2021-08-24 19:15:53 +08:00
parent 5de455bb86
commit 1b05c404d5

View file

@ -3043,18 +3043,15 @@ public final class Player implements
final PopupMenu popupMenu = new PopupMenu(themeWrapper, view); final PopupMenu popupMenu = new PopupMenu(themeWrapper, view);
popupMenu.inflate(R.menu.menu_play_queue_item); popupMenu.inflate(R.menu.menu_play_queue_item);
// Don't show Details in Main Player Popup
popupMenu.getMenu().findItem(R.id.menu_item_details).setVisible(false);
popupMenu.setOnMenuItemClickListener(menuItem -> { popupMenu.setOnMenuItemClickListener(menuItem -> {
switch (menuItem.getItemId()) { switch (menuItem.getItemId()) {
case R.id.menu_item_remove: case R.id.menu_item_remove:
final int index = playQueue.indexOf(item); final int index = playQueue.indexOf(item);
playQueue.remove(index); playQueue.remove(index);
return true; return true;
case R.id.menu_item_details:
// playQueue is null since we don't want any queue change
NavigationHelper.openVideoDetail(context, item.getServiceId(),
item.getUrl(), item.getTitle(), null,
false);
return true;
case R.id.menu_item_append_playlist: case R.id.menu_item_append_playlist:
final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems( final PlaylistAppendDialog d = PlaylistAppendDialog.fromPlayQueueItems(
Collections.singletonList(item) Collections.singletonList(item)