build(Needs bump): Bump dependencies (#2946)
Co-authored-by: Ushie <ushiekane@gmail.com> Co-authored-by: aAbed <aabedhkhan@gmail.com> Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
This commit is contained in:
co-authored by
Ushie
aAbed
CnC-Robert
parent
fe3a6fd4a4
commit
8c8dff9078
+10
-12
@@ -1,22 +1,20 @@
|
||||
package app.revanced.patches.reddit.layout.disablescreenshotpopup.patch
|
||||
package app.revanced.patches.reddit.layout.disablescreenshotpopup
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.reddit.layout.disablescreenshotpopup.annotations.DisableScreenshotPopupCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.reddit.layout.disablescreenshotpopup.fingerprints.DisableScreenshotPopupFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Disable screenshot popup")
|
||||
@Description("Disables the popup that shows up when taking a screenshot.")
|
||||
@DisableScreenshotPopupCompatibility
|
||||
class DisableScreenshotPopupPatch : BytecodePatch(
|
||||
listOf(DisableScreenshotPopupFingerprint)
|
||||
) {
|
||||
@Patch(
|
||||
name = "Disable screenshot popup",
|
||||
description = "Disables the popup that shows up when taking a screenshot.",
|
||||
compatiblePackages = [CompatiblePackage("com.reddit.frontpage")]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DisableScreenshotPopupPatch : BytecodePatch(setOf(DisableScreenshotPopupFingerprint)) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
DisableScreenshotPopupFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||
?: throw DisableScreenshotPopupFingerprint.exception
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.reddit.layout.disablescreenshotpopup.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.reddit.frontpage")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class DisableScreenshotPopupCompatibility
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package app.revanced.patches.reddit.layout.premiumicon
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
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.layout.premiumicon.fingerprints.HasPremiumIconAccessFingerprint
|
||||
|
||||
|
||||
@Patch(
|
||||
name = "Unlock premium Reddit icons",
|
||||
compatiblePackages = [CompatiblePackage("com.reddit.frontpage")]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object UnlockPremiumIconPatch : BytecodePatch(setOf(HasPremiumIconAccessFingerprint)) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
HasPremiumIconAccessFingerprint.result?.mutableMethod?.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
"""
|
||||
) ?: throw HasPremiumIconAccessFingerprint.exception
|
||||
}
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.reddit.layout.premiumicon.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.reddit.frontpage")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class PremiumIconCompatibility
|
||||
+1
-1
@@ -2,7 +2,7 @@ package app.revanced.patches.reddit.layout.premiumicon.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object PremiumIconFingerprint : MethodFingerprint(
|
||||
object HasPremiumIconAccessFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package app.revanced.patches.reddit.layout.premiumicon.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility
|
||||
import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Premium icon reddit")
|
||||
@Description("Unlocks premium Reddit app icons.")
|
||||
@PremiumIconCompatibility
|
||||
class PremiumIconPatch : BytecodePatch(
|
||||
listOf(
|
||||
PremiumIconFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
val method = PremiumIconFingerprint.result!!.mutableMethod
|
||||
method.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user