mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-06-26 15:13:00 +00:00
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 ;)
This commit is contained in:
parent
3dba719d9f
commit
61432a2a31
@ -124,7 +124,6 @@ import org.schabi.newpipe.util.DependentPreferenceHelper;
|
||||
import org.schabi.newpipe.util.ExtractorHelper;
|
||||
import org.schabi.newpipe.util.ListHelper;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.PermissionHelper;
|
||||
import org.schabi.newpipe.util.SerializedCache;
|
||||
import org.schabi.newpipe.util.StreamTypeUtil;
|
||||
import org.schabi.newpipe.util.image.PicassoHelper;
|
||||
@ -364,13 +363,8 @@ public final class Player implements PlaybackListener, Listener {
|
||||
// can move the initUIs stuff without breaking the setup for edge cases somehow.
|
||||
switch (playerIntentType) {
|
||||
case TimestampChange -> {
|
||||
// TODO: this breaks out of the pattern of asking for the permission before
|
||||
// sending the PlayerIntent, but I’m not sure yet how to combine the permissions
|
||||
// with the new enum approach. Maybe it’s better that the player asks anyway?
|
||||
if (!PermissionHelper.isPopupEnabledElseAsk(context)) {
|
||||
return;
|
||||
}
|
||||
newPlayerType = PlayerType.POPUP;
|
||||
// when playing from a timestamp, keep the current player as-is.
|
||||
newPlayerType = playerType;
|
||||
}
|
||||
default -> {
|
||||
newPlayerType = PlayerType.retrieveFromIntent(intent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user