From f6c3bc43190d33e06f49b74fc056d26da1bb014a Mon Sep 17 00:00:00 2001 From: MarcaD <152095496+MarcaDian@users.noreply.github.com> Date: Sun, 21 Apr 2024 02:58:56 +0300 Subject: [PATCH] feat(YouTube - Swipe controls): Save and restore brightness and add auto-brightness toggle (#2996) Co-authored-by: oSumAtrIX --- .../interaction/swipecontrols/SwipeControlsResourcePatch.kt | 1 + src/main/resources/addresources/values/strings.xml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsResourcePatch.kt index 70fe6e50..51a7c991 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsResourcePatch.kt @@ -24,6 +24,7 @@ internal object SwipeControlsResourcePatch : ResourcePatch() { SwitchPreference("revanced_swipe_press_to_engage"), SwitchPreference("revanced_swipe_haptic_feedback"), SwitchPreference("revanced_swipe_save_and_restore_brightness"), + SwitchPreference("revanced_swipe_lowest_value_enable_auto_brightness"), TextPreference("revanced_swipe_overlay_timeout", inputType = InputType.NUMBER), TextPreference("revanced_swipe_text_overlay_size", inputType = InputType.NUMBER), TextPreference("revanced_swipe_overlay_background_alpha", inputType = InputType.NUMBER), diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 476c9cf5..f59fcb61 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -340,6 +340,10 @@ Save and restore brightness Save and restore brightness when exiting or entering fullscreen Do not save and restore brightness when exiting or entering fullscreen + Enable auto-brightness gesture + Swiping down to the lowest value of the brightness gesture enable auto-brightness + Swiping down to the lowest value does not enable auto-brightness + Auto Swipe overlay timeout The amount of milliseconds the overlay is visible Swipe overlay text size