From 98ead493380932cb105530f4ba992673fd364d82 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 12 Sep 2024 22:09:09 +0200 Subject: [PATCH] feat(Sync for Reddit): Rename patch to `Use /user/ endpoint` The bug it was used to fix does not occur anymore. This name is more correct on what the patch actually does. --- api/revanced-patches.api | 4 ++-- .../{FixUserEndpointPatch.kt => UseUserEndpointPatch.kt} | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) rename src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/{FixUserEndpointPatch.kt => UseUserEndpointPatch.kt} (92%) diff --git a/api/revanced-patches.api b/api/revanced-patches.api index c9b58d288..c79665585 100644 --- a/api/revanced-patches.api +++ b/api/revanced-patches.api @@ -828,8 +828,8 @@ public final class app/revanced/patches/reddit/customclients/syncforreddit/fix/s public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/fix/slink/FixSLinksPatch; } -public final class app/revanced/patches/reddit/customclients/syncforreddit/fix/user/FixUserEndpointPatch : app/revanced/patcher/patch/BytecodePatch { - public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/fix/user/FixUserEndpointPatch; +public final class app/revanced/patches/reddit/customclients/syncforreddit/fix/user/UseUserEndpointPatch : app/revanced/patcher/patch/BytecodePatch { + public static final field INSTANCE Lapp/revanced/patches/reddit/customclients/syncforreddit/fix/user/UseUserEndpointPatch; public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V } diff --git a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/FixUserEndpointPatch.kt b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/UseUserEndpointPatch.kt similarity index 92% rename from src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/FixUserEndpointPatch.kt rename to src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/UseUserEndpointPatch.kt index 9105dda72..bafff0b45 100644 --- a/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/FixUserEndpointPatch.kt +++ b/src/main/kotlin/app/revanced/patches/reddit/customclients/syncforreddit/fix/user/UseUserEndpointPatch.kt @@ -17,16 +17,17 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.reference.StringReference @Patch( - name = "Fix /user/ endpoint", - description = "Fixes the endpoint for viewing user profiles by replacing /u/ with /user/.", + name = "Use /user/ endpoint", + description = "Replaces the deprecated endpoint for viewing user profiles /u with /user, that used to fix a bug.", compatiblePackages = [ CompatiblePackage("com.laurencedawson.reddit_sync"), CompatiblePackage("com.laurencedawson.reddit_sync.pro"), CompatiblePackage("com.laurencedawson.reddit_sync.dev"), ], + use = false, ) @Suppress("unused") -object FixUserEndpointPatch : BytecodePatch( +object UseUserEndpointPatch : BytecodePatch( fingerprints = setOf( OAuthFriendRequestFingerprint, OAuthSubredditInfoRequestConstructorFingerprint,