feat(Proton Mail): Add Remove free accounts limit patch (#4970)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
ByteEVM
2025-05-30 22:51:12 +02:00
committed by GitHub
parent 8edc2d5de9
commit b0440ad6af
3 changed files with 26 additions and 1 deletions

View File

@ -448,6 +448,10 @@ public final class app/revanced/patches/primevideo/misc/permissions/RenamePermis
public static final fun getRenamePermissionsPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
}
public final class app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatchKt {
public static final fun getRemoveFreeAccountsLimitPatch ()Lapp/revanced/patcher/patch/ResourcePatch;
}
public final class app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatchKt {
public static final fun getRemoveSentFromSignaturePatch ()Lapp/revanced/patcher/patch/ResourcePatch;
}

View File

@ -0,0 +1,21 @@
package app.revanced.patches.protonmail.account
import app.revanced.patcher.patch.resourcePatch
import app.revanced.util.findElementByAttributeValueOrThrow
@Suppress("unused")
val removeFreeAccountsLimitPatch = resourcePatch(
name = "Remove free accounts limit",
description = "Removes the limit for maximum free accounts logged in.",
) {
compatibleWith("ch.protonmail.android")
execute {
document("res/values/integers.xml").use { document ->
document.documentElement.childNodes.findElementByAttributeValueOrThrow(
"name",
"core_feature_auth_user_check_max_free_user_count",
).textContent = Int.MAX_VALUE.toString()
}
}
}

View File

@ -39,4 +39,4 @@ val removeSentFromSignaturePatch = resourcePatch(
if (!foundString) throw PatchException("Could not find 'sent from' string in resources")
}
}
}