feat(Reddit): Restrict support version to 2025.05.1 (Close https://github.com/inotia00/ReVanced_Extended/issues/2772)

This commit is contained in:
inotia00 2025-02-10 16:13:16 +09:00
parent 60809b2636
commit 7667b70c67
3 changed files with 22 additions and 13 deletions

View File

@ -10,6 +10,7 @@ import app.revanced.patches.reddit.utils.patch.PatchList.REMOVE_SUBREDDIT_DIALOG
import app.revanced.patches.reddit.utils.settings.is_2024_41_or_greater import app.revanced.patches.reddit.utils.settings.is_2024_41_or_greater
import app.revanced.patches.reddit.utils.settings.is_2025_01_or_greater import app.revanced.patches.reddit.utils.settings.is_2025_01_or_greater
import app.revanced.patches.reddit.utils.settings.is_2025_05_or_greater import app.revanced.patches.reddit.utils.settings.is_2025_05_or_greater
import app.revanced.patches.reddit.utils.settings.is_2025_06_or_greater
import app.revanced.patches.reddit.utils.settings.settingsPatch import app.revanced.patches.reddit.utils.settings.settingsPatch
import app.revanced.patches.reddit.utils.settings.updatePatchStatus import app.revanced.patches.reddit.utils.settings.updatePatchStatus
import app.revanced.util.fingerprint.methodOrThrow import app.revanced.util.fingerprint.methodOrThrow
@ -83,6 +84,7 @@ val subRedditDialogPatch = bytecodePatch(
} }
// Not used in latest Reddit client. // Not used in latest Reddit client.
if (!is_2025_06_or_greater) {
redditAlertDialogsFingerprint.methodOrThrow().apply { redditAlertDialogsFingerprint.methodOrThrow().apply {
val backgroundTintIndex = indexOfSetBackgroundTintListInstruction(this) val backgroundTintIndex = indexOfSetBackgroundTintListInstruction(this)
val insertIndex = val insertIndex =
@ -97,6 +99,7 @@ val subRedditDialogPatch = bytecodePatch(
"invoke-static {v$insertRegister}, $EXTENSION_CLASS_DESCRIPTOR->confirmDialog(Landroid/widget/TextView;)V" "invoke-static {v$insertRegister}, $EXTENSION_CLASS_DESCRIPTOR->confirmDialog(Landroid/widget/TextView;)V"
) )
} }
}
updatePatchStatus( updatePatchStatus(
"enableSubRedditDialog", "enableSubRedditDialog",

View File

@ -8,6 +8,9 @@ internal object Constants {
val COMPATIBLE_PACKAGE: Pair<PackageName, Set<VersionName>?> = Pair( val COMPATIBLE_PACKAGE: Pair<PackageName, Set<VersionName>?> = Pair(
REDDIT_PACKAGE_NAME, REDDIT_PACKAGE_NAME,
null setOf(
"2024.17.0", // This is the last version that can be patched without anti-split.
"2025.05.1", // This is the latest version supported by the RVX patch.
)
) )
} }

View File

@ -41,6 +41,8 @@ var is_2025_01_or_greater = false
private set private set
var is_2025_05_or_greater = false var is_2025_05_or_greater = false
private set private set
var is_2025_06_or_greater = false
private set
private val settingsBytecodePatch = bytecodePatch( private val settingsBytecodePatch = bytecodePatch(
description = "settingsBytecodePatch" description = "settingsBytecodePatch"
@ -65,6 +67,7 @@ private val settingsBytecodePatch = bytecodePatch(
is_2024_41_or_greater = 2024410 <= versionNumber is_2024_41_or_greater = 2024410 <= versionNumber
is_2025_01_or_greater = 2025010 <= versionNumber is_2025_01_or_greater = 2025010 <= versionNumber
is_2025_05_or_greater = 2025050 <= versionNumber is_2025_05_or_greater = 2025050 <= versionNumber
is_2025_06_or_greater = 2025060 <= versionNumber
} }
/** /**