diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/annotations/NavigationButtonsCompatibility.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/annotations/NavigationButtonsCompatibility.kt new file mode 100644 index 000000000..865a74afb --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/annotations/NavigationButtonsCompatibility.kt @@ -0,0 +1,8 @@ +package app.revanced.patches.reddit.layout.navigation.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility([Package("com.reddit.frontpage", arrayOf("2023.25.1"))]) +@Target(AnnotationTarget.CLASS) +internal annotation class NavigationButtonsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/ChatButtonPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/ChatButtonPatch.kt index 95c32734f..7963e556c 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/ChatButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/ChatButtonPatch.kt @@ -9,8 +9,8 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.reddit.layout.navigation.annotations.NavigationButtonsCompatibility import app.revanced.patches.reddit.layout.navigation.patch.NavigationButtonsPatch.Companion.setValue -import app.revanced.patches.reddit.utils.annotations.RedditCompatibility import app.revanced.patches.reddit.utils.settings.bytecode.patch.SettingsBytecodePatch.Companion.updateSettingsStatus import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch @@ -23,7 +23,7 @@ import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch SettingsPatch::class ] ) -@RedditCompatibility +@NavigationButtonsCompatibility @Version("0.0.1") class ChatButtonPatch : BytecodePatch() { override fun execute(context: BytecodeContext): PatchResult { diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/CreateButtonPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/CreateButtonPatch.kt index c6a9a641f..e994d5e74 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/CreateButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/CreateButtonPatch.kt @@ -9,8 +9,8 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.reddit.layout.navigation.annotations.NavigationButtonsCompatibility import app.revanced.patches.reddit.layout.navigation.patch.NavigationButtonsPatch.Companion.setValue -import app.revanced.patches.reddit.utils.annotations.RedditCompatibility import app.revanced.patches.reddit.utils.settings.bytecode.patch.SettingsBytecodePatch.Companion.updateSettingsStatus import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch @@ -23,7 +23,7 @@ import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch SettingsPatch::class ] ) -@RedditCompatibility +@NavigationButtonsCompatibility @Version("0.0.1") class CreateButtonPatch : BytecodePatch() { override fun execute(context: BytecodeContext): PatchResult { diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/DiscoverButtonPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/DiscoverButtonPatch.kt index 7872519ab..80b777319 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/DiscoverButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/DiscoverButtonPatch.kt @@ -9,8 +9,8 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch +import app.revanced.patches.reddit.layout.navigation.annotations.NavigationButtonsCompatibility import app.revanced.patches.reddit.layout.navigation.patch.NavigationButtonsPatch.Companion.setValue -import app.revanced.patches.reddit.utils.annotations.RedditCompatibility import app.revanced.patches.reddit.utils.settings.bytecode.patch.SettingsBytecodePatch.Companion.updateSettingsStatus import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch @@ -23,7 +23,7 @@ import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch SettingsPatch::class ] ) -@RedditCompatibility +@NavigationButtonsCompatibility @Version("0.0.1") class DiscoverButtonPatch : BytecodePatch() { override fun execute(context: BytecodeContext): PatchResult { diff --git a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/NavigationButtonsPatch.kt index fa518251a..101949b52 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/layout/navigation/patch/NavigationButtonsPatch.kt @@ -13,13 +13,11 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patches.reddit.layout.navigation.fingerprints.BottomNavScreenFingerprint -import app.revanced.patches.reddit.utils.annotations.RedditCompatibility import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction @Name("hide-navigation-buttons") @Description("Hide navigation buttons.") -@RedditCompatibility @Version("0.0.1") class NavigationButtonsPatch : BytecodePatch( listOf(BottomNavScreenFingerprint)