From fe74f6d8a6740a4d4544344474756c8ac717748f Mon Sep 17 00:00:00 2001 From: aliernfrog <45766489+aliernfrog@users.noreply.github.com> Date: Sun, 20 Nov 2022 17:02:08 +0300 Subject: [PATCH] feat(youtube): `disable-zoom-haptics` patch (#217) --- .../revanced/integrations/patches/ZoomHapticsPatch.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/ZoomHapticsPatch.java diff --git a/app/src/main/java/app/revanced/integrations/patches/ZoomHapticsPatch.java b/app/src/main/java/app/revanced/integrations/patches/ZoomHapticsPatch.java new file mode 100644 index 00000000..94a07acb --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/ZoomHapticsPatch.java @@ -0,0 +1,9 @@ +package app.revanced.integrations.patches; + +import app.revanced.integrations.settings.SettingsEnum; + +public class ZoomHapticsPatch { + public static boolean shouldVibrate() { + return !SettingsEnum.DISABLE_ZOOM_HAPTICS.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 8ea0887d..bc99d832 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -91,6 +91,7 @@ public enum SettingsEnum { TAP_SEEKING_ENABLED("revanced_enable_tap_seeking", true, ReturnType.BOOLEAN), ENABLE_MINIMIZED_PLAYBACK("revanced_enable_minimized_playback", true, ReturnType.BOOLEAN), OPEN_LINKS_DIRECTLY("revanced_uri_redirect", true, ReturnType.BOOLEAN, true), + DISABLE_ZOOM_HAPTICS("revanced_disable_zoom_haptics", true, ReturnType.BOOLEAN, false), // Swipe controls ENABLE_SWIPE_BRIGHTNESS("revanced_enable_swipe_brightness", true, ReturnType.BOOLEAN),