From e5e246e4d518565ca6442f945a1efa0b4b6dd7ca Mon Sep 17 00:00:00 2001
From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Date: Tue, 22 Oct 2024 21:59:17 -0400
Subject: [PATCH] fix(YouTube - Hide layout components): Hide player shopping
shelf
---
.../layout/hide/general/HideLayoutComponentsPatch.kt | 6 +++++-
src/main/resources/addresources/values/strings.xml | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
index b9e8c8598f..dc7333fcf6 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt
@@ -91,6 +91,10 @@ object HideLayoutComponentsPatch : BytecodePatch(
override fun execute(context: BytecodeContext) {
AddResourcesPatch(this::class)
+ SettingsPatch.PreferenceScreen.ADS.addPreferences(
+ SwitchPreference("revanced_hide_player_store_shelf"),
+ )
+
SettingsPatch.PreferenceScreen.PLAYER.addPreferences(
PreferenceScreen(
key = "revanced_hide_description_components_screen",
@@ -113,7 +117,7 @@ object HideLayoutComponentsPatch : BytecodePatch(
SwitchPreference("revanced_hide_comments_thanks_button"),
SwitchPreference("revanced_hide_comments_timestamp_and_emoji_buttons")
),
- sorting = PreferenceScreen.Sorting.UNSORTED
+ sorting = Sorting.UNSORTED
),
SwitchPreference("revanced_hide_channel_bar"),
SwitchPreference("revanced_hide_channel_guidelines"),
diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml
index 5dfc34f8b4..cda396bd01 100644
--- a/src/main/resources/addresources/values/strings.xml
+++ b/src/main/resources/addresources/values/strings.xml
@@ -107,6 +107,9 @@ This is because Crowdin requires temporarily flattening this file and removing t
Disable like / subscribe button glow
Like and subscribe button will not glow when mentioned
Like and subscribe button will glow when mentioned
+ Hide player shopping shelf
+ Shopping shelf is hidden
+ Shopping shelf is shown
Hide album cards
Album cards are hidden
Album cards are shown