mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-19 02:19:23 +01:00
fix(youtube/minimized-playback): disable when playing shorts
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
512d747ec8
commit
1dd84a3785
@ -1,9 +1,14 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.shared.PlayerType;
|
||||
|
||||
public class MinimizedPlaybackPatch {
|
||||
|
||||
public static boolean isNotPlayingShorts(boolean isPipEnabled) {
|
||||
return !PlayerType.getCurrent().isNoneOrHidden() && isPipEnabled;
|
||||
}
|
||||
|
||||
public static boolean isMinimizedPlaybackEnabled() {
|
||||
return SettingsEnum.ENABLE_MINIMIZED_PLAYBACK.getBoolean();
|
||||
}
|
||||
|
@ -49,4 +49,11 @@ enum class PlayerType {
|
||||
*/
|
||||
val onChange = Event<PlayerType>()
|
||||
}
|
||||
|
||||
/**
|
||||
* Weather Shorts are being played.
|
||||
*/
|
||||
fun isNoneOrHidden(): Boolean {
|
||||
return this == NONE || this == HIDDEN
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user