mirror of
https://github.com/revanced/revanced-patches
synced 2025-01-07 12:15:53 +01: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.layout.buttons.navigation.utils.InjectionUtils.injectHook
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
@ -177,13 +176,7 @@ object NavigationButtonsPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
PivotBarCreateButtonViewFingerprint.result!!.apply {
|
PivotBarCreateButtonViewFingerprint.result!!.apply {
|
||||||
val insertIndex = mutableMethod.implementation!!.instructions.let {
|
val insertIndex = scanResult.patternScanResult!!.endIndex
|
||||||
val scanStart = scanResult.patternScanResult!!.endIndex
|
|
||||||
|
|
||||||
scanStart + it.subList(scanStart, it.size - 1).indexOfFirst { instruction ->
|
|
||||||
instruction.opcode == Opcode.INVOKE_STATIC
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inject hooks
|
* Inject hooks
|
||||||
|
@ -5,7 +5,9 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
object PivotBarCreateButtonViewFingerprint : MethodFingerprint(
|
object PivotBarCreateButtonViewFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.MOVE_OBJECT,
|
Opcode.INVOKE_DIRECT_RANGE,
|
||||||
Opcode.INVOKE_DIRECT_RANGE, // unique instruction anchor
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.INVOKE_STATIC
|
||||||
)
|
)
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user