feat(VSCO - Unlock pro): Constrain to last working version

This commit is contained in:
oSumAtrIX 2024-02-25 18:38:11 +01:00
parent ebae8cffb9
commit 6dd4a7c29e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -1,20 +1,20 @@
package app.revanced.patches.vsco.misc.pro
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.vsco.misc.pro.fingerprints.RevCatSubscriptionFingerprint
import app.revanced.util.exception
@Patch(
name = "Unlock pro",
description = "Unlocks pro features.",
compatiblePackages = [CompatiblePackage("com.vsco.cam")]
compatiblePackages = [CompatiblePackage("com.vsco.cam", ["345"])],
)
object UnlockProPatch : BytecodePatch(
setOf(RevCatSubscriptionFingerprint)
setOf(RevCatSubscriptionFingerprint),
) {
override fun execute(context: BytecodeContext) {
RevCatSubscriptionFingerprint.result?.mutableMethod?.apply {
@ -23,7 +23,7 @@ object UnlockProPatch : BytecodePatch(
0,
"""
const p1, 0x1
"""
""",
)
} ?: throw RevCatSubscriptionFingerprint.exception
}