File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -576,6 +576,7 @@ private static PlayQueue getPlayQueueFromCache(@NonNull final Intent intent) {
576576
577577 private void initUIsForCurrentPlayerType () {
578578 if ((UIs .get (MainPlayerUi .class ).isPresent () && playerType == PlayerType .MAIN )
579+ || (UIs .get (BackgroundPlayerUi .class ).isPresent () && playerType == PlayerType .AUDIO )
579580 || (UIs .get (PopupPlayerUi .class ).isPresent () && playerType == PlayerType .POPUP )) {
580581 // correct UI already in place
581582 return ;
@@ -603,7 +604,7 @@ private void initUIsForCurrentPlayerType() {
603604 UIs .addAndPrepare (new PopupPlayerUi (this , binding ));
604605 break ;
605606 case AUDIO :
606- UIs .destroyAll (VideoPlayerUi .class );
607+ UIs .destroyAll (VideoPlayerUi .class ); // destroys both MainPlayerUi and PopupPlayerUi
607608 UIs .addAndPrepare (new BackgroundPlayerUi (this ));
608609 break ;
609610 }
You can’t perform that action at this time.
0 commit comments