mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-11-08 11:13:00 +00:00
Refactor streams to initialize with values
This commit is contained in:
@@ -54,8 +54,7 @@ public abstract class PlayQueue implements Serializable {
|
|||||||
private transient boolean disposed;
|
private transient boolean disposed;
|
||||||
|
|
||||||
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
|
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
|
||||||
streams = new ArrayList<>();
|
streams = new ArrayList<>(startWith);
|
||||||
streams.addAll(startWith);
|
|
||||||
history = new ArrayList<>();
|
history = new ArrayList<>();
|
||||||
if (streams.size() > index) {
|
if (streams.size() > index) {
|
||||||
history.add(streams.get(index));
|
history.add(streams.get(index));
|
||||||
|
|||||||
Reference in New Issue
Block a user