Skip to content

Commit 1723bf0

Browse files
committed
Player/handleIntent: keep current player when clicking timestamp
This was always a bit weird, that clicking a timestamp would unconditionally switch to the popup player. With the new enum, it’s trivial to change it to always stay at the selected player now ;)
1 parent eb277fe commit 1723bf0

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

app/src/main/java/org/schabi/newpipe/player/Player.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
import org.schabi.newpipe.util.ExtractorHelper;
123123
import org.schabi.newpipe.util.ListHelper;
124124
import org.schabi.newpipe.util.NavigationHelper;
125-
import org.schabi.newpipe.util.PermissionHelper;
126125
import org.schabi.newpipe.util.SerializedCache;
127126
import org.schabi.newpipe.util.StreamTypeUtil;
128127
import org.schabi.newpipe.util.image.PicassoHelper;
@@ -362,13 +361,8 @@ public void handleIntent(@NonNull final Intent intent) {
362361
// can move the initUIs stuff without breaking the setup for edge cases somehow.
363362
switch (playerIntentType) {
364363
case TimestampChange -> {
365-
// TODO: this breaks out of the pattern of asking for the permission before
366-
// sending the PlayerIntent, but I’m not sure yet how to combine the permissions
367-
// with the new enum approach. Maybe it’s better that the player asks anyway?
368-
if (!PermissionHelper.isPopupEnabledElseAsk(context)) {
369-
return;
370-
}
371-
newPlayerType = PlayerType.POPUP;
364+
// when playing from a timestamp, keep the current player as-is.
365+
newPlayerType = playerType;
372366
}
373367
default -> {
374368
newPlayerType = PlayerType.retrieveFromIntent(intent);

0 commit comments

Comments
 (0)