diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/OpenVideosFullscreenHookPatch.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/OpenVideosFullscreenHookPatch.java index f209850914..89773b66c1 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/OpenVideosFullscreenHookPatch.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/OpenVideosFullscreenHookPatch.java @@ -18,8 +18,8 @@ public static void setOpenNextShortFullscreen(@Nullable Boolean forceFullScreen) * Changed by 'Open videos fullscreen' patch, * as this class is also used by 'Open Shorts in regular player' patch. */ - private static boolean fullScreenPatchIncluded() { - return false; // Modified by patches + private static boolean isFullScreenPatchIncluded() { + return false; // Modified by patches. } /** @@ -32,7 +32,7 @@ public static boolean openVideoFullscreenPortrait(boolean original) { return openFullscreen; } - if (!fullScreenPatchIncluded()) { + if (!isFullScreenPatchIncluded()) { return false; } diff --git a/patches/api/patches.api b/patches/api/patches.api index 6ef3d46d2b..279cb797ed 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -1176,6 +1176,10 @@ public final class app/revanced/patches/youtube/layout/player/background/PlayerC public static final fun getPlayerControlsBackgroundPatch ()Lapp/revanced/patcher/patch/ResourcePatch; } +public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenFullscreenVideosKt { + public static final fun getOpenVideosFullscreen ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatchKt { public static final fun getOpenVideosFullscreenPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/Fingerprints.kt index 83b81c40b0..096ed695da 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/Fingerprints.kt @@ -23,6 +23,6 @@ internal val openVideosFullscreenHookPatchExtensionFingerprint = fingerprint { returns("Z") parameters() custom { methodDef, classDef -> - methodDef.name == "fullScreenPatchIncluded" && classDef.type == EXTENSION_CLASS_DESCRIPTOR + methodDef.name == "isFullScreenPatchIncluded" && classDef.type == EXTENSION_CLASS_DESCRIPTOR } } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenFullscreenVideos.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenFullscreenVideos.kt new file mode 100644 index 0000000000..89311b08c0 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenFullscreenVideos.kt @@ -0,0 +1,9 @@ +package app.revanced.patches.youtube.layout.player.fullscreen + +import app.revanced.patcher.patch.bytecodePatch + +@Suppress("unused") +@Deprecated("Renamed to openVideosFullscreenPatch", ReplaceWith("openVideosFullscreenPatch")) +val openVideosFullscreen = bytecodePatch{ + dependsOn(openVideosFullscreenPatch) +} \ No newline at end of file diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt index 6d2fb31c92..defd98902b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/player/fullscreen/OpenVideosFullscreenPatch.kt @@ -43,4 +43,4 @@ val openVideosFullscreenPatch = bytecodePatch( SwitchPreference("revanced_open_videos_fullscreen_portrait") ) } -} +} \ No newline at end of file