-
-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Infinity for Reddit): Add
Unlock subscription
patch
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...ed/patches/reddit/customclients/infinityforreddit/subscription/UnlockSubscriptionPatch.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
} |
7 changes: 7 additions & 0 deletions
7
...ients/infinityforreddit/subscription/fingerprints/StartSubscriptionActivityFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
) |