chore: merge branch dev to main (#315)

This commit is contained in:
oSumAtrIX 2023-02-11 01:34:48 +01:00 committed by GitHub
commit 70170e24ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,10 @@
## [0.96.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.96.0...v0.96.1-dev.1) (2023-02-11)
### Bug Fixes
* **youtube/minimized-playback:** disable when playing shorts ([1dd84a3](https://github.com/revanced/revanced-integrations/commit/1dd84a37851359143140d1d1df664c3eab680fa7))
# [0.96.0](https://github.com/revanced/revanced-integrations/compare/v0.95.0...v0.96.0) (2023-02-10)

View File

@ -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();
}

View File

@ -49,4 +49,11 @@ enum class PlayerType {
*/
val onChange = Event<PlayerType>()
}
/**
* Weather Shorts are being played.
*/
fun isNoneOrHidden(): Boolean {
return this == NONE || this == HIDDEN
}
}

View File

@ -1,3 +1,3 @@
org.gradle.jvmargs = -Xmx2048m
android.useAndroidX = true
version = 0.96.0
version = 0.96.1-dev.1