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:
obXfuse 2026-02-26 18:03:55 -05:00 committed by GitHub
parent 8a84f1a516
commit 2976ea3ddd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 58 additions and 2 deletions

View 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;")
}
}

View 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)
}
}

View file

@ -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;")
}
}

View file

@ -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)
}
}