mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-09 12:47:01 +01:00
feat(Infinity for Reddit): Add Unlock subscription
patch
This commit is contained in:
parent
ca42fd9365
commit
840b29e989
@ -0,0 +1,24 @@
|
||||
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
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.util.Utils.returnEarly
|
||||
|
||||
@Patch(
|
||||
name = "Unlock subscription",
|
||||
description = "Unlocks the subscription feature but requires a custom client ID.",
|
||||
dependencies = [SpoofClientPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("ml.docilealligator.infinityforreddit")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object UnlockSubscriptionPatch : BytecodePatch(
|
||||
setOf(StartSubscriptionActivityFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) = listOf(StartSubscriptionActivityFingerprint).returnEarly()
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription.fingerprints
|
||||
|
||||
import app.revanced.util.patch.LiteralValueFingerprint
|
||||
|
||||
internal object StartSubscriptionActivityFingerprint : LiteralValueFingerprint(
|
||||
literalSupplier = { 0x10008000 } // Intent start flag only used in the subscription activity
|
||||
)
|
Loading…
Reference in New Issue
Block a user