fix(Twitter): Fix patches by depending on patch that merges required extension

This commit is contained in:
oSumAtrIX 2024-11-11 17:58:46 +01:00
parent 2ff1af16d2
commit c330e9d67d
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 8 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import app.revanced.patcher.patch.stringOption
import app.revanced.patches.shared.misc.mapping.get
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
import app.revanced.patches.shared.misc.mapping.resourceMappings
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
@ -39,7 +40,10 @@ val changeLinkSharingDomainPatch = bytecodePatch(
name = "Change link sharing domain",
description = "Replaces the domain name of Twitter links when sharing them.",
) {
dependsOn(changeLinkSharingDomainResourcePatch)
dependsOn(
changeLinkSharingDomainResourcePatch,
sharedExtensionPatch,
)
compatibleWith("com.twitter.android")
@ -52,7 +56,6 @@ val changeLinkSharingDomainPatch = bytecodePatch(
)
execute {
val replacementIndex =
linkSharingDomainFingerprint.stringMatches!!.first().index
val domainRegister =

View File

@ -2,6 +2,7 @@ package app.revanced.patches.twitter.misc.links
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
@Suppress("unused")
val openLinksWithAppChooserPatch = bytecodePatch(
@ -10,6 +11,8 @@ val openLinksWithAppChooserPatch = bytecodePatch(
"As a result you can select a browser to open the link with.",
use = false,
) {
dependsOn(sharedExtensionPatch)
compatibleWith("com.twitter.android"("10.48.0-release.0"))
execute {