From a553a13c0326ef2fff7f785fed592d553a7963ce Mon Sep 17 00:00:00 2001
From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
Date: Tue, 22 Oct 2024 23:56:02 -0400
Subject: [PATCH] feat(YouTube): Hide player shopping shelf in playlists
(#3806)
---
.../patches/youtube/ad/general/HideAdsResourcePatch.kt | 1 +
.../layout/hide/general/HideLayoutComponentsPatch.kt | 4 ----
src/main/resources/addresources/values/strings.xml | 6 +++---
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt
index 1ef5e77234..307f39ad08 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsResourcePatch.kt
@@ -31,6 +31,7 @@ object HideAdsResourcePatch : ResourcePatch() {
SwitchPreference("revanced_hide_fullscreen_ads"),
SwitchPreference("revanced_hide_buttoned_ads"),
SwitchPreference("revanced_hide_paid_promotion_label"),
+ SwitchPreference("revanced_hide_player_store_shelf"),
SwitchPreference("revanced_hide_self_sponsor_ads"),
SwitchPreference("revanced_hide_products_banner"),
SwitchPreference("revanced_hide_shopping_links"),
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 dc7333fcf6..229f08d306 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,10 +91,6 @@ 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",
diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml
index cda396bd01..295c840772 100644
--- a/src/main/resources/addresources/values/strings.xml
+++ b/src/main/resources/addresources/values/strings.xml
@@ -107,9 +107,6 @@ 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
@@ -339,6 +336,9 @@ This is because Crowdin requires temporarily flattening this file and removing t
Hide banner to view products
Banner is hidden
Banner is shown
+ Hide player shopping shelf
+ Shopping shelf is hidden
+ Shopping shelf is shown
Hide shopping links in video description
Shopping links are hidden
Shopping links are shown