diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt index 35131aa03..a985953d8 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/ChangeLinkSharingDomainPatch.kt @@ -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 = diff --git a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/OpenLinksWithAppChooserPatch.kt b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/OpenLinksWithAppChooserPatch.kt index 03033e7d5..a0fa4d0cc 100644 --- a/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/OpenLinksWithAppChooserPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/twitter/misc/links/OpenLinksWithAppChooserPatch.kt @@ -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 {