Skip to content

Commit

Permalink
fix(Twitter): Fix patches by depending on patch that merges required …
Browse files Browse the repository at this point in the history
…extension
  • Loading branch information
oSumAtrIX committed Nov 11, 2024
1 parent 2ff1af1 commit c330e9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand All @@ -52,7 +56,6 @@ val changeLinkSharingDomainPatch = bytecodePatch(
)

execute {

val replacementIndex =
linkSharingDomainFingerprint.stringMatches!!.first().index
val domainRegister =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 {
Expand Down

0 comments on commit c330e9d

Please sign in to comment.