1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-26 07:03:20 +00:00

Refactor assignments to field declaration

Assignments that don't require the constructor can be moved out.
This commit is contained in:
Eric Xu 2021-05-21 18:04:22 -04:00 committed by Zhiheng Xu
parent 441c68ead2
commit 8efe2859b8

View File

@ -46,22 +46,21 @@ public abstract class PlayQueue implements Serializable {
@NonNull
private final AtomicInteger queueIndex;
private final List<PlayQueueItem> history;
private final List<PlayQueueItem> history = new ArrayList<>();
private transient BehaviorSubject<PlayQueueEvent> eventBroadcast;
private transient Flowable<PlayQueueEvent> broadcastReceiver;
private transient boolean disposed;
private transient boolean disposed = false;
PlayQueue(final int index, final List<PlayQueueItem> startWith) {
streams = new ArrayList<>(startWith);
history = new ArrayList<>();
if (streams.size() > index) {
history.add(streams.get(index));
}
queueIndex = new AtomicInteger(index);
disposed = false;
}
/*//////////////////////////////////////////////////////////////////////////