From 55502446ce5967922f2e9711a5fea2758fe31e83 Mon Sep 17 00:00:00 2001 From: d4rkk3y <43563783+d4rkk3y@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:20:25 +0700 Subject: [PATCH] fix: `seekbar-tapping` toggling (#401) --- .../interaction/seekbar/patch/EnableSeekbarTappingPatch.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt index c0374a94b..9b6b68893 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt @@ -84,6 +84,7 @@ class EnableSeekbarTappingPatch : BytecodePatch( if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return PatchResultError("Could not find the correct register") val register = (instruction as Instruction35c).registerC + val elseLabel = implementation.newLabelForIndex(result.patternScanResult!!.endIndex + 1) // the instructions are written in reverse order. result.mutableMethod.addInstructions( result.patternScanResult!!.endIndex + 1, """ @@ -93,7 +94,6 @@ class EnableSeekbarTappingPatch : BytecodePatch( ) // if tap-seeking is disabled, do not invoke the two methods above by jumping to the else label - val elseLabel = implementation.newLabelForIndex(result.patternScanResult!!.endIndex + 1) implementation.addInstruction( result.patternScanResult!!.endIndex + 1, BuilderInstruction21t(Opcode.IF_EQZ, 0, elseLabel) )