Enqueue: Replaced specific StreamDialogEntry items with one

The enqueue options won't be shown in the dialogs if the Player service is not running. When it's running one item (enqueue stream) will be shown and enqueues the item into the Player type which is currently selected.
This commit is contained in:
vkay94 2020-10-06 14:38:48 +02:00
parent cd515993f5
commit ed6fc4d848
6 changed files with 69 additions and 45 deletions

View file

@ -12,6 +12,7 @@ import org.schabi.newpipe.player.MainPlayer;
import org.schabi.newpipe.player.helper.PlayerHolder;
import org.schabi.newpipe.player.playqueue.SinglePlayQueue;
import java.util.ArrayList;
import java.util.Collections;
public enum StreamDialogEntry {
@ -108,6 +109,10 @@ public enum StreamDialogEntry {
// non-static methods to initialize and edit entries //
///////////////////////////////////////////////////////
public static void setEnabledEntries(final ArrayList<StreamDialogEntry> entries) {
setEnabledEntries(entries.toArray(new StreamDialogEntry[0]));
}
/**
* To be called before using {@link #setCustomAction(StreamDialogEntryAction)}.
*