From eafe50ba7a743502b5ae98de9f9992ba42b72c5b Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Tue, 11 Jun 2024 23:36:27 +0900 Subject: [PATCH] feat(YouTube/Shorts components): remove `Hide disabled comments button` setting https://github.com/inotia00/ReVanced_Extended/issues/2127 --- .../shorts/components/ShortsComponentPatch.kt | 12 +++++------- .../youtube/settings/host/values/strings.xml | 3 --- .../youtube/settings/xml/revanced_prefs.xml | 7 +------ 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt index df796109d..f2de96b0c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt @@ -299,14 +299,12 @@ object ShortsComponentPatch : BaseBytecodePatch( /** * Add settings */ - var settingArray = arrayOf( - "PREFERENCE_SCREEN: SHORTS", - "SETTINGS: SHORTS_COMPONENTS" + SettingsPatch.addPreference( + arrayOf( + "PREFERENCE_SCREEN: SHORTS", + "SETTINGS: SHORTS_COMPONENTS" + ) ) - if (SettingsPatch.upward1834) { - settingArray += "SETTINGS: HIDE_SHORTS_COMMENTS_DISABLED_BUTTON" - } - SettingsPatch.addPreference(settingArray) SettingsPatch.updatePatchStatus(this) } diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml index 8113c28c3..e8038058a 100644 --- a/src/main/resources/youtube/settings/host/values/strings.xml +++ b/src/main/resources/youtube/settings/host/values/strings.xml @@ -1034,9 +1034,6 @@ Limitation: Official headers in search results will be hidden." Hide Comments button Comments button is hidden. Comments button is shown. - Hide disabled comments button - Disabled comments button or with label \"0\" is hidden. - Disabled comments button or with label \"0\" is shown. Hide Remix button Remix button is hidden. Remix button is shown. diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 3553f7b3c..c1897e62e 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -448,12 +448,7 @@ - SETTINGS: SHORTS_COMPONENTS --> - - - -