From 8d15a141b19ff0548985eb688ff7c957cfeb0526 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 26 Dec 2024 00:26:59 +0100 Subject: [PATCH] PlayerHolder: invert isBound --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 4 ++-- .../java/org/schabi/newpipe/player/helper/PlayerHolder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 2dd24fabf..eb497cd79 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -657,7 +657,7 @@ public final class VideoDetailFragment }); setupBottomPlayer(); - if (!playerHolder.isBound()) { + if (playerHolder.isNotBoundYet()) { setHeightThumbnail(); } else { playerHolder.startService(false, this); @@ -1383,7 +1383,7 @@ public final class VideoDetailFragment bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); } // Rebound to the service if it was closed via notification or mini player - if (!playerHolder.isBound()) { + if (playerHolder.isNotBoundYet()) { playerHolder.startService( false, VideoDetailFragment.this); } diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java index 74b125178..18821ab09 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java @@ -81,8 +81,8 @@ public final class PlayerHolder { return player != null && player.getPlayQueue() != null; } - public boolean isBound() { - return bound; + public boolean isNotBoundYet() { + return !bound; } public int getQueueSize() {