Skip to content

Commit

Permalink
fix(Infinity for Reddit - Unlock subscription): Restore functionality…
Browse files Browse the repository at this point in the history
… on v7.0.0
  • Loading branch information
oSumAtrIX committed Feb 1, 2024
1 parent 82e226d commit bf19af9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.reddit.customclients.infinityforreddit.api.SpoofClientPatch
import app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints.StartSubscriptionActivityFingerprint
import app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints.SubscriptionActivityOnCreateFingerprint
import app.revanced.util.returnEarly

@Patch(
Expand All @@ -18,7 +19,8 @@ import app.revanced.util.returnEarly
)
@Suppress("unused")
object UnlockSubscriptionPatch : BytecodePatch(
setOf(StartSubscriptionActivityFingerprint)
setOf(StartSubscriptionActivityFingerprint, SubscriptionActivityOnCreateFingerprint)
) {
override fun execute(context: BytecodeContext) = listOf(StartSubscriptionActivityFingerprint).returnEarly()
override fun execute(context: BytecodeContext) =
listOf(StartSubscriptionActivityFingerprint, SubscriptionActivityOnCreateFingerprint).returnEarly()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints

import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags

internal object SubscriptionActivityOnCreateFingerprint : MethodFingerprint(
returnType = "V",
accessFlags = AccessFlags.PUBLIC.value,
parameters = listOf("Landroid/os/Bundle;"),
customFingerprint = { method, classDef ->
method.name == "onCreate" && classDef.type.endsWith("SubscriptionActivity;")
}
)

0 comments on commit bf19af9

Please sign in to comment.