From 77f159987d714e6390b5be6ba5c6e034e101fff5 Mon Sep 17 00:00:00 2001 From: obXfuse Date: Sun, 22 Feb 2026 15:18:02 -0500 Subject: [PATCH] feat(gmxmail): split into two patches --- patches/api/patches.api | 4 ++++ .../revanced/patches/gmxmail/ads/Fingerprints.kt | 6 ------ .../revanced/patches/gmxmail/ads/HideAdsPatch.kt | 4 +--- .../patches/gmxmail/premium/Fingerprints.kt | 9 +++++++++ .../gmxmail/premium/HidePremiumUpgradeButton.kt | 15 +++++++++++++++ 5 files changed, 29 insertions(+), 9 deletions(-) create mode 100755 patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/Fingerprints.kt create mode 100755 patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/HidePremiumUpgradeButton.kt diff --git a/patches/api/patches.api b/patches/api/patches.api index b82ae4c9b8..a27f394a84 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -240,6 +240,10 @@ public final class app/revanced/patches/gmxmail/ads/HideAdsPatchKt { public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } +public final class app/revanced/patches/gmxmail/premium/HidePremiumUpgradeButtonKt { + public static final fun getHidePremiumUpgradeButtonPatch ()Lapp/revanced/patcher/patch/BytecodePatch; +} + public final class app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatchKt { public static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch; } diff --git a/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt index f391e70ecb..797ccc027f 100755 --- a/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt +++ b/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/Fingerprints.kt @@ -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;") - } } \ No newline at end of file diff --git a/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt index aa0aadf50b..6a1917167b 100755 --- a/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/gmxmail/ads/HideAdsPatch.kt @@ -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) } } diff --git a/patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/Fingerprints.kt b/patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/Fingerprints.kt new file mode 100755 index 0000000000..53b1dc98aa --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/Fingerprints.kt @@ -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;") + } +} \ No newline at end of file diff --git a/patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/HidePremiumUpgradeButton.kt b/patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/HidePremiumUpgradeButton.kt new file mode 100755 index 0000000000..b354c75186 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/gmxmail/premium/HidePremiumUpgradeButton.kt @@ -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) + } +}