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:
co-authored by
Tobias
oSumAtrIX
parent
8a84f1a516
commit
2976ea3ddd
@@ -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;")
|
||||
}
|
||||
}
|
||||
@@ -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;")
|
||||
}
|
||||
}
|
||||
+15
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user