feat(gmxmail): add hide sponsored ads and remove premium upgrade button patch

This commit is contained in:
obXfuse 2026-02-15 13:02:12 -05:00
parent de8c004dc2
commit 818cf509f2
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,15 @@
package app.revanced.patches.gmxmail.ads
import app.revanced.patcher.fingerprint
internal val getAdvertisementStatusFingerprint = fingerprint {
custom { method, classDef ->
method.name == "getAdvertisementStatus" && classDef.endsWith("/PayMailManager;")
}
}
internal val isUpsellingPossibleFingerprint = fingerprint {
custom { method, classDef ->
method.name == "isUpsellingPossible" && classDef.endsWith("/PayMailManager;")
}
}

View file

@ -0,0 +1,17 @@
package app.revanced.patches.gmxmail.ads
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val hideAdsPatch = bytecodePatch(
name = "Hide ads",
description = "Hides sponsored ads and removes the Premium upgrade button from the navigation drawer.",
) {
compatibleWith("de.gmx.mobile.android.mail")
execute {
getAdvertisementStatusFingerprint.method.returnEarly(2)
isUpsellingPossibleFingerprint.method.returnEarly(false)
}
}