fix(YouTube): App crashes when Overlay buttons patch is excluded https://github.com/inotia00/ReVanced_Extended/issues/2521

This commit is contained in:
inotia00 2024-12-09 01:39:49 +09:00
parent 3fcf78ef75
commit 5abd2dd9dc

View File

@ -14,6 +14,7 @@ import app.revanced.patches.youtube.utils.extension.Constants.PATCH_STATUS_CLASS
import app.revanced.patches.youtube.utils.extension.Constants.PLAYER_CLASS_DESCRIPTOR
import app.revanced.patches.youtube.utils.flyoutmenu.flyoutMenuHookPatch
import app.revanced.patches.youtube.utils.patch.PatchList.SEEKBAR_COMPONENTS
import app.revanced.patches.youtube.utils.playerButtonsResourcesFingerprint
import app.revanced.patches.youtube.utils.playerButtonsVisibilityFingerprint
import app.revanced.patches.youtube.utils.playerSeekbarColorFingerprint
import app.revanced.patches.youtube.utils.playservice.is_19_23_or_greater
@ -238,7 +239,7 @@ val seekbarComponentsPatch = bytecodePatch(
)
}
playerButtonsVisibilityFingerprint.methodOrThrow(playerButtonsVisibilityFingerprint).apply {
playerButtonsVisibilityFingerprint.methodOrThrow(playerButtonsResourcesFingerprint).apply {
val freeRegister = implementation!!.registerCount - parameters.size - 2
val viewIndex = indexOfFirstInstructionOrThrow(Opcode.INVOKE_INTERFACE)
val viewRegister = getInstruction<FiveRegisterInstruction>(viewIndex).registerD