Refactor streams to initialize with values

This commit is contained in:
Eric Xu 2021-05-21 14:12:35 -04:00 committed by Zhiheng Xu
parent 013c59f904
commit 4cd1f201f5
1 changed files with 1 additions and 2 deletions

View File

@ -54,8 +54,7 @@ public abstract class PlayQueue implements Serializable {
private transient boolean disposed;
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
streams = new ArrayList<>();
streams.addAll(startWith);
streams = new ArrayList<>(startWith);
history = new ArrayList<>();
if (streams.size() > index) {
history.add(streams.get(index));