feat(GMX Mail): Add Hide ads and Hide Premium upgrade button patches (#6583)
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
8a84f1a516
commit
2976ea3ddd
5 changed files with 58 additions and 2 deletions
9
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt
Executable file
9
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
package app.revanced.patches.gmxmail.ads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val getAdvertisementStatusFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
method.name == "getAdvertisementStatus" && classDef.endsWith("/PayMailManager;")
|
||||
}
|
||||
}
|
||||
15
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt
Executable file
15
patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
package app.revanced.patches.gmxmail.ads
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
val hideAdsPatch = bytecodePatch(
|
||||
name = "Hide ads",
|
||||
description = "Hides sponsored ads.",
|
||||
) {
|
||||
compatibleWith("de.gmx.mobile.android.mail")
|
||||
|
||||
execute {
|
||||
getAdvertisementStatusFingerprint.method.returnEarly(2)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package app.revanced.patches.gmxmail.layout
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val isUpsellingPossibleFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
method.name == "isUpsellingPossible" && classDef.endsWith("/PayMailManager;")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package app.revanced.patches.gmxmail.layout
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
val hidePremiumUpgradeButtonPatch = bytecodePatch(
|
||||
name = "Hide Premium upgrade button",
|
||||
description = "Hides the Premium upgrade button in the navigation drawer.",
|
||||
) {
|
||||
compatibleWith("de.gmx.mobile.android.mail")
|
||||
|
||||
execute {
|
||||
isUpsellingPossibleFingerprint.method.returnEarly(false)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue