Skip to content

Commit bdeeaef

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 c8a1f06 commit bdeeaef

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;
@@ -353,13 +352,8 @@ public void handleIntent(@NonNull final Intent intent) {
353352
// can move the initUIs stuff without breaking the setup for edge cases somehow.
354353
switch (playerIntentType) {
355354
case TimestampChange -> {
356-
// TODO: this breaks out of the pattern of asking for the permission before
357-
// sending the PlayerIntent, but I’m not sure yet how to combine the permissions
358-
// with the new enum approach. Maybe it’s better that the player asks anyway?
359-
if (!PermissionHelper.isPopupEnabledElseAsk(context)) {
360-
return;
361-
}
362-
newPlayerType = PlayerType.POPUP;
355+
// when playing from a timestamp, keep the current player as-is.
356+
newPlayerType = playerType;
363357
}
364358
default -> {
365359
newPlayerType = PlayerType.retrieveFromIntent(intent);

0 commit comments

Comments
 (0)