fix(X / Twitter): Constrain patches to latest compatible versions (#4683)

This commit is contained in:
LisoUseInAIKyrios 2025-03-28 17:11:30 +01:00 committed by GitHub
parent 6b19e19332
commit f5797289f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 4 deletions

View File

@ -10,7 +10,13 @@ val dynamicColorPatch = resourcePatch(
name = "Dynamic color",
description = "Replaces the default X (Formerly Twitter) Blue with the user's Material You palette.",
) {
compatibleWith("com.twitter.android")
compatibleWith(
"com.twitter.android"(
"10.84.0-release.0",
"10.60.0-release.0",
"10.48.0-release.0"
)
)
execute {
val resDirectory = get("res")

View File

@ -11,7 +11,15 @@ fun hookPatch(
) = bytecodePatch(name) {
dependsOn(jsonHookPatch)
compatibleWith("com.twitter.android")
compatibleWith(
"com.twitter.android"(
// 10.85+ uses Pairip and requires additional changes to work.
"10.84.0-release.0",
// Confirmed to not show reply ads. Slightly newer versions may also work.
"10.60.0-release.0",
"10.48.0-release.0"
)
)
execute {
addJsonHook(JsonHook(hookClassDescriptor))

View File

@ -37,7 +37,13 @@ val changeLinkSharingDomainPatch = bytecodePatch(
sharedExtensionPatch,
)
compatibleWith("com.twitter.android")
compatibleWith(
"com.twitter.android"(
"10.84.0-release.0",
"10.60.0-release.0",
"10.48.0-release.0"
)
)
val domainName by stringOption(
key = "domainName",

View File

@ -8,7 +8,13 @@ val sanitizeSharingLinksPatch = bytecodePatch(
name = "Sanitize sharing links",
description = "Removes the tracking query parameters from links before they are shared.",
) {
compatibleWith("com.twitter.android")
compatibleWith(
"com.twitter.android"(
"10.84.0-release.0",
"10.60.0-release.0",
"10.48.0-release.0"
)
)
execute {
sanitizeSharingLinksFingerprint.method.addInstructions(