Skip to content

Conversation

@TobiGr
Copy link
Contributor

@TobiGr TobiGr commented Dec 20, 2025

What is it?

  • Bugfix (user facing)

Description of the changes in your PR

onNext() is called after onSubscribe() when creating a PlayQueueAdapter. For that reason the last broadcasted event is applied to the UI state although it is already reflected in the PlayQueue that was used to initialize the adapter.

This is the intended behavior of the previously used event broadcaster of the type BehaviorSubject<>. The broadcaster's type was changed to PublishSubject<> which does not emit the last event after onSubscribe().

Before/After Screenshots/Screen Record

For screen records of the bugged behaviour, see #9669

Screen_recording_20251220_181830.webm

Review request

Help me identify why a BehaviorSubject was used in the first place. Is there a place where its functionality is needed?

Fixes the following issue(s)

Fixes #9669

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@TobiGr TobiGr added GUI Issue is related to the graphical user interface queue Issue is related to queueing labels Dec 20, 2025
@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Dec 20, 2025
@TobiGr TobiGr added this to v0.28.x Dec 20, 2025
@github-project-automation github-project-automation bot moved this to Todo in v0.28.x Dec 20, 2025
@TobiGr TobiGr moved this from Todo to In Progress in v0.28.x Dec 20, 2025
@TobiGr TobiGr added the bug Issue is related to a bug label Dec 20, 2025
onNext() is called after onSubscribe() when creating a PlayQueueAdapter. For that reason the last broadcasted event is applied to the UI state although it is already reflected in the PlayQueue that was used to initialize the adapter.

This is the intended behavior of the previously used event broadcaster of the type BehaviorSubject<>. The broadcaster's type was changed to PublishSubject<> which does not emit the last event after onSubscribe().

Ref: TeamNewPipe#9669
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug GUI Issue is related to the graphical user interface queue Issue is related to queueing size/small PRs with less than 50 changed lines

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

"Enqueue Next" item displays on Play queue incorrectly

1 participant