We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7a7dc5 commit 49b7194Copy full SHA for 49b7194
app/src/main/java/org/schabi/newpipe/player/PlayerService.java
@@ -319,11 +319,8 @@ public Player getPlayer() {
319
public void setPlayerListener(@Nullable final Consumer<Player> listener) {
320
this.onPlayerStartedOrStopped = listener;
321
if (listener != null) {
322
- if (player == null) {
323
- listener.accept(null);
324
- } else {
325
- listener.accept(player);
326
- }
+ // if there is no player, then `null` will be sent here, to ensure the state is synced
+ listener.accept(player);
327
}
328
329
//endregion
0 commit comments