mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-29 09:55:52 +01:00
fix(Twitter): Fix patches by depending on patch that merges required extension
This commit is contained in:
parent
2ff1af16d2
commit
c330e9d67d
@ -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.get
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
import app.revanced.patches.shared.misc.mapping.resourceMappingPatch
|
||||||
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
import app.revanced.patches.shared.misc.mapping.resourceMappings
|
||||||
|
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
|
||||||
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
import app.revanced.util.indexOfFirstLiteralInstructionOrThrow
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
@ -39,7 +40,10 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
|||||||
name = "Change link sharing domain",
|
name = "Change link sharing domain",
|
||||||
description = "Replaces the domain name of Twitter links when sharing them.",
|
description = "Replaces the domain name of Twitter links when sharing them.",
|
||||||
) {
|
) {
|
||||||
dependsOn(changeLinkSharingDomainResourcePatch)
|
dependsOn(
|
||||||
|
changeLinkSharingDomainResourcePatch,
|
||||||
|
sharedExtensionPatch,
|
||||||
|
)
|
||||||
|
|
||||||
compatibleWith("com.twitter.android")
|
compatibleWith("com.twitter.android")
|
||||||
|
|
||||||
@ -52,7 +56,6 @@ val changeLinkSharingDomainPatch = bytecodePatch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
|
|
||||||
val replacementIndex =
|
val replacementIndex =
|
||||||
linkSharingDomainFingerprint.stringMatches!!.first().index
|
linkSharingDomainFingerprint.stringMatches!!.first().index
|
||||||
val domainRegister =
|
val domainRegister =
|
||||||
|
@ -2,6 +2,7 @@ package app.revanced.patches.twitter.misc.links
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.bytecodePatch
|
import app.revanced.patcher.patch.bytecodePatch
|
||||||
|
import app.revanced.patches.twitter.misc.extension.sharedExtensionPatch
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val openLinksWithAppChooserPatch = bytecodePatch(
|
val openLinksWithAppChooserPatch = bytecodePatch(
|
||||||
@ -10,6 +11,8 @@ val openLinksWithAppChooserPatch = bytecodePatch(
|
|||||||
"As a result you can select a browser to open the link with.",
|
"As a result you can select a browser to open the link with.",
|
||||||
use = false,
|
use = false,
|
||||||
) {
|
) {
|
||||||
|
dependsOn(sharedExtensionPatch)
|
||||||
|
|
||||||
compatibleWith("com.twitter.android"("10.48.0-release.0"))
|
compatibleWith("com.twitter.android"("10.48.0-release.0"))
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
|
Loading…
Reference in New Issue
Block a user