mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Refactor assignments to field declaration
Assignments that don't require the constructor can be moved out.
This commit is contained in:
		| @@ -46,22 +46,21 @@ public abstract class PlayQueue implements Serializable { | |||||||
|  |  | ||||||
|     @NonNull |     @NonNull | ||||||
|     private final AtomicInteger queueIndex; |     private final AtomicInteger queueIndex; | ||||||
|     private final List<PlayQueueItem> history; |     private final List<PlayQueueItem> history = new ArrayList<>(); | ||||||
|  |  | ||||||
|     private transient BehaviorSubject<PlayQueueEvent> eventBroadcast; |     private transient BehaviorSubject<PlayQueueEvent> eventBroadcast; | ||||||
|     private transient Flowable<PlayQueueEvent> broadcastReceiver; |     private transient Flowable<PlayQueueEvent> broadcastReceiver; | ||||||
|  |  | ||||||
|     private transient boolean disposed; |     private transient boolean disposed = false; | ||||||
|  |  | ||||||
|     PlayQueue(final int index, final List<PlayQueueItem> startWith) { |     PlayQueue(final int index, final List<PlayQueueItem> startWith) { | ||||||
|         streams = new ArrayList<>(startWith); |         streams = new ArrayList<>(startWith); | ||||||
|         history = new ArrayList<>(); |  | ||||||
|         if (streams.size() > index) { |         if (streams.size() > index) { | ||||||
|             history.add(streams.get(index)); |             history.add(streams.get(index)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         queueIndex = new AtomicInteger(index); |         queueIndex = new AtomicInteger(index); | ||||||
|         disposed = false; |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /*////////////////////////////////////////////////////////////////////////// |     /*////////////////////////////////////////////////////////////////////////// | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Eric Xu
					Eric Xu