Skip to content

Commit 295acc4

Browse files
committed
Player/handleIntent: de morgan samePlayQueue
Okay, so this is the … only? branch in this if-chain that will conditionally fire if `playQueue` *is* `null`, sometimes. This is why the unconditional `initPlayback` in `else` is not passed a `null` in many cases … because `RESUME_PLAYBACK` is `true` and `playQueue` is `null`. It’s gonna be hard to figure out which parts of that are intentional, I say.
1 parent 007ff47 commit 295acc4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/player/Player.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@ public void handleIntent(@NonNull final Intent intent) {
431431

432432
} else if (intent.getBooleanExtra(RESUME_PLAYBACK, false)
433433
&& DependentPreferenceHelper.getResumePlaybackEnabled(context)
434-
&& !samePlayQueue
434+
// !samePlayQueue
435+
&& (playQueue == null || !playQueue.equalStreamsAndIndex(newQueue))
435436
&& !newQueue.isEmpty()
436437
&& newQueue.getItem() != null
437438
&& newQueue.getItem().getRecoveryPosition() == PlayQueueItem.RECOVERY_UNSET) {

0 commit comments

Comments
 (0)