From 831dea9c21566219973eec1ef8a257fdd9704e8b Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:53:53 +0900 Subject: [PATCH] fix(YouTube/Settings): move the following settings to `Experimental Flags` - `Enable compact controls overlay`, `Disable landscape mode`, `Hide suggestions shelf` --- .../CompactControlsOverlayPatch.kt | 1 + .../landscapemode/LandScapeModePatch.kt | 1 + .../general/layout/LayoutComponentsPatch.kt | 1 + .../suggestions/SuggestionsShelfPatch.kt | 1 + .../youtube/settings/xml/revanced_prefs.xml | 26 ++++++++++++------- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/fullscreen/compactcontrolsoverlay/CompactControlsOverlayPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/fullscreen/compactcontrolsoverlay/CompactControlsOverlayPatch.kt index 0532a702a..c914af525 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/fullscreen/compactcontrolsoverlay/CompactControlsOverlayPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/fullscreen/compactcontrolsoverlay/CompactControlsOverlayPatch.kt @@ -80,6 +80,7 @@ object CompactControlsOverlayPatch : BytecodePatch( SettingsPatch.addPreference( arrayOf( "PREFERENCE: FULLSCREEN_SETTINGS", + "SETTINGS: FULLSCREEN_EXPERIMENTAL_FLAGS", "SETTINGS: ENABLE_COMPACT_CONTROLS_OVERLAY" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/fullscreen/landscapemode/LandScapeModePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/fullscreen/landscapemode/LandScapeModePatch.kt index f5cd692f2..9cb50edfc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/fullscreen/landscapemode/LandScapeModePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/fullscreen/landscapemode/LandScapeModePatch.kt @@ -68,6 +68,7 @@ object LandScapeModePatch : BytecodePatch( SettingsPatch.addPreference( arrayOf( "PREFERENCE: FULLSCREEN_SETTINGS", + "SETTINGS: FULLSCREEN_EXPERIMENTAL_FLAGS", "SETTINGS: DISABLE_LANDSCAPE_MODE" ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt index 11bfc00ca..95c6161d1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/layout/LayoutComponentsPatch.kt @@ -59,6 +59,7 @@ object LayoutComponentsPatch : BytecodePatch() { "PREFERENCE: GENERAL_SETTINGS", "PREFERENCE: PLAYER_SETTINGS", + "SETTINGS: GENERAL_EXPERIMENTAL_FLAGS", "SETTINGS: HIDE_AUDIO_TRACK_BUTTON", "SETTINGS: HIDE_CHANNEL_BAR_BUTTON", "SETTINGS: HIDE_LAYOUT_COMPONENTS" diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/SuggestionsShelfPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/SuggestionsShelfPatch.kt index 02c523a1f..c7e9b461f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/SuggestionsShelfPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/suggestions/SuggestionsShelfPatch.kt @@ -82,6 +82,7 @@ object SuggestionsShelfPatch : BytecodePatch( SettingsPatch.addPreference( arrayOf( "PREFERENCE: GENERAL_SETTINGS", + "SETTINGS: GENERAL_EXPERIMENTAL_FLAGS", "SETTINGS: HIDE_SUGGESTIONS_SHELF" ) ) diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 6dadd3ab5..96b2dc55b 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -119,9 +119,6 @@ - - @@ -147,8 +144,13 @@ SETTINGS: QUICK_ACTIONS_COMPONENTS --> - + + + + - - @@ -242,8 +241,15 @@ - - + SETTINGS: HIDE_LAYOUT_COMPONENTS --> + + + + + +