fix(YouTube/Settings): Search bar in settings can't find RYD and SponsorBlock settings

This commit is contained in:
inotia00
2024-09-23 22:20:33 +09:00
parent 6d48adef53
commit 9bd51f7df8
7 changed files with 102 additions and 61 deletions

View File

@ -30,8 +30,8 @@ import app.revanced.util.patch.BaseBytecodePatch
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.RegisterRangeInstruction
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
@Suppress("unused")
object PlayerButtonsPatch : BaseBytecodePatch(
@ -182,7 +182,7 @@ object PlayerButtonsPatch : BaseBytecodePatch(
PlayerControlsVisibilityModelFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
val callIndex = indexOfFirstInstructionOrThrow(Opcode.INVOKE_DIRECT_RANGE)
val callInstruction = getInstruction<Instruction3rc>(callIndex)
val callInstruction = getInstruction<RegisterRangeInstruction>(callIndex)
val hasNextParameterRegister = callInstruction.startRegister + HAS_NEXT
val hasPreviousParameterRegister = callInstruction.startRegister + HAS_PREVIOUS