diff --git a/patches/api/patches.api b/patches/api/patches.api index 668e1072e..a96d4a6c9 100644 --- a/patches/api/patches.api +++ b/patches/api/patches.api @@ -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; } diff --git a/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt b/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt new file mode 100644 index 000000000..473d8d400 --- /dev/null +++ b/patches/src/main/kotlin/app/revanced/patches/protonmail/account/RemoveFreeAccountsLimitPatch.kt @@ -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() + } + } +} diff --git a/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt b/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt index f3d2b2dd2..a59b8e7dd 100644 --- a/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/protonmail/signature/RemoveSentFromSignaturePatch.kt @@ -39,4 +39,4 @@ val removeSentFromSignaturePatch = resourcePatch( if (!foundString) throw PatchException("Could not find 'sent from' string in resources") } -} \ No newline at end of file +}