mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-04-29 22:24:27 +02:00
feat(Messenger): Add Remove Meta AI tab
patch (#4726)
This commit is contained in:
parent
ebc5ebc0a9
commit
e3fad97484
@ -272,6 +272,10 @@ public final class app/revanced/patches/messenger/inputfield/DisableTypingIndica
|
||||
public static final fun getDisableTypingIndicatorPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/messenger/navbar/RemoveMetaAITabPatchKt {
|
||||
public static final fun getRemoveMetaAITabPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/mifitness/misc/locale/ForceEnglishLocalePatchKt {
|
||||
public static final fun getForceEnglishLocalePatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package app.revanced.patches.messenger.navbar
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val createTabConfigurationFingerprint = fingerprint {
|
||||
strings("MessengerTabConfigurationCreator.createTabConfiguration")
|
||||
opcodes(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
)
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package app.revanced.patches.messenger.navbar
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Suppress("unused")
|
||||
val removeMetaAITabPatch = bytecodePatch(
|
||||
name = "Remove Meta AI tab",
|
||||
description = "Removes the 'Meta AI' tab from the navbar.",
|
||||
) {
|
||||
compatibleWith("com.facebook.orca")
|
||||
|
||||
execute {
|
||||
createTabConfigurationFingerprint.let {
|
||||
val moveResultIndex = it.patternMatch!!.startIndex + 1
|
||||
val enabledRegister = it.method.getInstruction<OneRegisterInstruction>(moveResultIndex).registerA
|
||||
it.method.replaceInstruction(
|
||||
moveResultIndex,
|
||||
"const/4 v$enabledRegister, 0x0"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user