Skip to content

Commit 61432a2

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 3dba719 commit 61432a2

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

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

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

0 commit comments

Comments
 (0)