From 78803f8ea85684e4c69e75b676fa40bae8760957 Mon Sep 17 00:00:00 2001 From: Dawid K <80264606+drobotk@users.noreply.github.com> Date: Mon, 15 May 2023 09:49:44 +0200 Subject: [PATCH] fix(youtube): add missing compatibility annotations for `theme` and `hide-load-more-button` (#2150) --- .../loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt | 2 ++ .../youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt index b670cf6d..b63f5230 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt @@ -14,6 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.fingerprints.HideLoadMoreButtonFingerprint import app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch.HideLoadMoreButtonResourcePatch +import app.revanced.patches.youtube.layout.hide.loadmorebutton.annotations.HideLoadMoreButtonCompatibility import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @@ -21,6 +22,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Name("hide-load-more-button") @Description("Hides the button under videos that loads similar videos.") @DependsOn([HideLoadMoreButtonResourcePatch::class]) +@HideLoadMoreButtonCompatibility @Version("0.0.1") class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerprint)) { override fun execute(context: BytecodeContext): PatchResult { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt index ee33e866..9274dce8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/bytecode/patch/ThemeBytecodePatch.kt @@ -11,11 +11,13 @@ import app.revanced.patches.youtube.layout.seekbar.bytecode.patch.SeekbarColorBy import app.revanced.patches.youtube.layout.seekbar.bytecode.fingerprints.CreateDarkThemeSeekbarFingerprint import app.revanced.patches.youtube.layout.seekbar.bytecode.fingerprints.SetSeekbarClickedColorFingerprint import app.revanced.patches.youtube.layout.theme.resource.ThemeResourcePatch +import app.revanced.patches.youtube.layout.theme.annotations.ThemeCompatibility @Patch @Name("theme") @Description("Applies a custom theme.") @DependsOn([LithoColorHookPatch::class, SeekbarColorBytecodePatch::class, ThemeResourcePatch::class]) +@ThemeCompatibility @Version("0.0.1") class ThemeBytecodePatch : BytecodePatch( listOf(CreateDarkThemeSeekbarFingerprint, SetSeekbarClickedColorFingerprint)