mirror of
https://github.com/revanced/revanced-patches
synced 2024-09-01 03:55:37 +02:00
feat(YouTube - Navigation buttons): Support version 18.43.45
This commit is contained in:
parent
9180d4f5c3
commit
e21286e4d7
@ -15,7 +15,6 @@ import app.revanced.patches.youtube.layout.buttons.navigation.utils.InjectionUti
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.utils.InjectionUtils.injectHook
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch(
|
||||
@ -177,13 +176,7 @@ object NavigationButtonsPatch : BytecodePatch(
|
||||
}
|
||||
|
||||
PivotBarCreateButtonViewFingerprint.result!!.apply {
|
||||
val insertIndex = mutableMethod.implementation!!.instructions.let {
|
||||
val scanStart = scanResult.patternScanResult!!.endIndex
|
||||
|
||||
scanStart + it.subList(scanStart, it.size - 1).indexOfFirst { instruction ->
|
||||
instruction.opcode == Opcode.INVOKE_STATIC
|
||||
}
|
||||
}
|
||||
val insertIndex = scanResult.patternScanResult!!.endIndex
|
||||
|
||||
/*
|
||||
* Inject hooks
|
||||
|
@ -5,7 +5,9 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object PivotBarCreateButtonViewFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.MOVE_OBJECT,
|
||||
Opcode.INVOKE_DIRECT_RANGE, // unique instruction anchor
|
||||
Opcode.INVOKE_DIRECT_RANGE,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_STATIC
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue
Block a user