Refactor streams to initialize with values
This commit is contained in:
parent
013c59f904
commit
4cd1f201f5
1 changed files with 1 additions and 2 deletions
|
@ -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));
|
||||||
|
|
Loading…
Reference in a new issue