feat(gmxmail): split into two patches

This commit is contained in:
obXfuse 2026-02-22 15:18:02 -05:00
parent 818cf509f2
commit 77f159987d
5 changed files with 29 additions and 9 deletions

View file

@ -6,10 +6,4 @@ 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

@ -3,15 +3,13 @@ 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.",
description = "Hides sponsored ads.",
) {
compatibleWith("de.gmx.mobile.android.mail")
execute {
getAdvertisementStatusFingerprint.method.returnEarly(2)
isUpsellingPossibleFingerprint.method.returnEarly(false)
}
}

View file

@ -0,0 +1,9 @@
package app.revanced.patches.gmxmail.premium
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.premium
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)
}
}