Skip to content

Commit 8d15a14

Browse files
committed
PlayerHolder: invert isBound
1 parent a78bed7 commit 8d15a14

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ protected void initListeners() {
657657
});
658658

659659
setupBottomPlayer();
660-
if (!playerHolder.isBound()) {
660+
if (playerHolder.isNotBoundYet()) {
661661
setHeightThumbnail();
662662
} else {
663663
playerHolder.startService(false, this);
@@ -1383,7 +1383,7 @@ public void onReceive(final Context context, final Intent intent) {
13831383
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
13841384
}
13851385
// Rebound to the service if it was closed via notification or mini player
1386-
if (!playerHolder.isBound()) {
1386+
if (playerHolder.isNotBoundYet()) {
13871387
playerHolder.startService(
13881388
false, VideoDetailFragment.this);
13891389
}

app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public boolean isPlayQueueReady() {
8181
return player != null && player.getPlayQueue() != null;
8282
}
8383

84-
public boolean isBound() {
85-
return bound;
84+
public boolean isNotBoundYet() {
85+
return !bound;
8686
}
8787

8888
public int getQueueSize() {

0 commit comments

Comments
 (0)