Skip to content

Commit fd24c08

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 e14ec3a commit fd24c08

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
@@ -429,7 +429,8 @@ public void handleIntent(@NonNull final Intent intent) {
429429

430430
} else if (intent.getBooleanExtra(RESUME_PLAYBACK, false)
431431
&& DependentPreferenceHelper.getResumePlaybackEnabled(context)
432-
&& !samePlayQueue
432+
// !samePlayQueue
433+
&& (playQueue == null || !playQueue.equalStreamsAndIndex(newQueue))
433434
&& !newQueue.isEmpty()
434435
&& newQueue.getItem() != null
435436
&& newQueue.getItem().getRecoveryPosition() == PlayQueueItem.RECOVERY_UNSET) {

0 commit comments

Comments
 (0)