From b1ce7a75eba53312d9522c87321ac83cb16d83cf Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 12 Nov 2023 16:02:05 +0100 Subject: [PATCH] feat(YouTube): Add `Enable slide to seek` patch Implementation references taken from github.com/inotia00/revanced-patches/commit/0ede1987544aa0068f28665c6c029df23a30afe2 --- .../revanced/integrations/patches/SlideToSeekPatch.java | 9 +++++++++ .../app/revanced/integrations/settings/SettingsEnum.java | 1 + 2 files changed, 10 insertions(+) create mode 100644 app/src/main/java/app/revanced/integrations/patches/SlideToSeekPatch.java diff --git a/app/src/main/java/app/revanced/integrations/patches/SlideToSeekPatch.java b/app/src/main/java/app/revanced/integrations/patches/SlideToSeekPatch.java new file mode 100644 index 00000000..ec739f5f --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/SlideToSeekPatch.java @@ -0,0 +1,9 @@ +package app.revanced.integrations.patches; + +import app.revanced.integrations.settings.SettingsEnum; + +public final class SlideToSeekPatch { + public static boolean isSlideToSeekDisabled() { + return !SettingsEnum.SLIDE_TO_SEEK.getBoolean(); + } +} diff --git a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java index 937fa02a..d830d06b 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -176,6 +176,7 @@ public enum SettingsEnum { EXTERNAL_BROWSER("revanced_external_browser", BOOLEAN, TRUE, true), AUTO_REPEAT("revanced_auto_repeat", BOOLEAN, FALSE), SEEKBAR_TAPPING("revanced_seekbar_tapping", BOOLEAN, TRUE), + SLIDE_TO_SEEK("revanced_slide_to_seek", BOOLEAN, FALSE), @Deprecated DISABLE_FINE_SCRUBBING_GESTURE("revanced_disable_fine_scrubbing_gesture", BOOLEAN, TRUE), DISABLE_PRECISE_SEEKING_GESTURE("revanced_disable_precise_seeking_gesture", BOOLEAN, TRUE), SPOOF_SIGNATURE("revanced_spoof_signature_verification_enabled", BOOLEAN, TRUE, true,