Skip to content

Commit

Permalink
fix(seekbar-tapping): do not disable seekbar when hiding it (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
OxrxL committed Sep 23, 2022
1 parent 797376a commit a151deb
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SeekbarTappingFingerprint
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.CreateVideoPlayerSeekbarFingerprint
Expand All @@ -27,7 +26,7 @@ import app.revanced.patches.youtube.misc.settings.framework.components.impl.Swit
@Version("0.0.1")
class HideTimeAndSeekbarPatch : BytecodePatch(
listOf(
CreateVideoPlayerSeekbarFingerprint, SeekbarTappingFingerprint, TimeCounterFingerprint
CreateVideoPlayerSeekbarFingerprint, TimeCounterFingerprint
)
) {
override fun execute(data: BytecodeData): PatchResult {
Expand Down Expand Up @@ -55,20 +54,6 @@ class HideTimeAndSeekbarPatch : BytecodePatch(
"""
)

val seekbarTappingMethod = SeekbarTappingFingerprint.result!!.mutableMethod

seekbarTappingMethod.addInstructions(
0, """
invoke-static { }, Lapp/revanced/integrations/patches/HideTimeAndSeekbarPatch;->hideTimeAndSeekbar()Z
move-result v0
if-eqz v0, :hide_time_and_seekbar
const/4 v0, 0x0
return v0
:hide_time_and_seekbar
nop
"""
)

val timeCounterMethod = TimeCounterFingerprint.result!!.mutableMethod

timeCounterMethod.addInstructions(
Expand Down

0 comments on commit a151deb

Please sign in to comment.