diff --git a/src/main/kotlin/app/revanced/patches/music/general/components/LayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/music/general/components/LayoutComponentsPatch.kt index 6c332458f..0c277ef54 100644 --- a/src/main/kotlin/app/revanced/patches/music/general/components/LayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/general/components/LayoutComponentsPatch.kt @@ -31,6 +31,7 @@ import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.TopBarM import app.revanced.patches.music.utils.settings.CategoryType import app.revanced.patches.music.utils.settings.SettingsPatch import app.revanced.patches.shared.litho.LithoFilterPatch +import app.revanced.patches.shared.settingmenu.SettingsMenuPatch import app.revanced.util.getTargetIndexOrThrow import app.revanced.util.getTargetIndexWithMethodReferenceNameOrThrow import app.revanced.util.getWideLiteralInstructionIndex @@ -48,6 +49,7 @@ object LayoutComponentsPatch : BaseBytecodePatch( dependencies = setOf( LithoFilterPatch::class, SharedResourceIdPatch::class, + SettingsMenuPatch::class, SettingsPatch::class ), compatiblePackages = COMPATIBLE_PACKAGE, @@ -295,6 +297,16 @@ object LayoutComponentsPatch : BaseBytecodePatch( "revanced_custom_filter_strings", "revanced_custom_filter" ) + SettingsPatch.addSwitchPreference( + CategoryType.GENERAL, + "revanced_hide_settings_menu", + "false" + ) + SettingsPatch.addPreferenceWithIntent( + CategoryType.GENERAL, + "revanced_hide_settings_menu_filter_strings", + "revanced_hide_settings_menu" + ) SettingsPatch.addSwitchPreference( CategoryType.GENERAL, "revanced_hide_button_shelf", diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml index 6a0faf2bf..7b8e71e73 100644 --- a/src/main/resources/music/settings/host/values/strings.xml +++ b/src/main/resources/music/settings/host/values/strings.xml @@ -153,6 +153,11 @@ Info: List of component path builder strings to filter, separated by new lines. Invalid custom filter: %s. + Hide settings menu + "Hide elements of the settings menu. +This hides not only the YT Music settings menu, but also the ReVanced Extended settings menu." + Settings menu filter + List of settings menu names to filter, separated by new lines. Hide button shelf Hides the button shelf in the feed. Hide carousel shelf