feat(reddit/hide-navigation-buttons): constrain to version 2023.25.1

This commit is contained in:
inotia00 2023-07-07 15:35:56 +09:00
parent 92b6e02039
commit 30a980d354
5 changed files with 14 additions and 8 deletions

View File

@ -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

View File

@ -9,8 +9,8 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch 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.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.bytecode.patch.SettingsBytecodePatch.Companion.updateSettingsStatus
import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch 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 SettingsPatch::class
] ]
) )
@RedditCompatibility @NavigationButtonsCompatibility
@Version("0.0.1") @Version("0.0.1")
class ChatButtonPatch : BytecodePatch() { class ChatButtonPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {

View File

@ -9,8 +9,8 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch 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.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.bytecode.patch.SettingsBytecodePatch.Companion.updateSettingsStatus
import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch 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 SettingsPatch::class
] ]
) )
@RedditCompatibility @NavigationButtonsCompatibility
@Version("0.0.1") @Version("0.0.1")
class CreateButtonPatch : BytecodePatch() { class CreateButtonPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {

View File

@ -9,8 +9,8 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch 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.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.bytecode.patch.SettingsBytecodePatch.Companion.updateSettingsStatus
import app.revanced.patches.reddit.utils.settings.resource.patch.SettingsPatch 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 SettingsPatch::class
] ]
) )
@RedditCompatibility @NavigationButtonsCompatibility
@Version("0.0.1") @Version("0.0.1")
class DiscoverButtonPatch : BytecodePatch() { class DiscoverButtonPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {

View File

@ -13,13 +13,11 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.reddit.layout.navigation.fingerprints.BottomNavScreenFingerprint 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.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Name("hide-navigation-buttons") @Name("hide-navigation-buttons")
@Description("Hide navigation buttons.") @Description("Hide navigation buttons.")
@RedditCompatibility
@Version("0.0.1") @Version("0.0.1")
class NavigationButtonsPatch : BytecodePatch( class NavigationButtonsPatch : BytecodePatch(
listOf(BottomNavScreenFingerprint) listOf(BottomNavScreenFingerprint)