From fea2c2da9c846492b00107ad2b456b33be26f589 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 2 Oct 2024 00:51:08 +0200 Subject: [PATCH 1/2] feat(YouTube - Hide Shorts components): Add option to hide like fountain --- .../layout/hide/shorts/HideShortsComponentsResourcePatch.kt | 5 +++-- src/main/resources/addresources/values/strings.xml | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt index c3ce3a0ccb..9d3c8464ed 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsResourcePatch.kt @@ -29,6 +29,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() { // since this Setting menu currently uses the ordering used here. // Vertical row of buttons on right side of the screen. + SwitchPreference("revanced_hide_shorts_like_fountain"), SwitchPreference("revanced_hide_shorts_like_button"), SwitchPreference("revanced_hide_shorts_dislike_button"), SwitchPreference("revanced_hide_shorts_comments_button"), @@ -59,7 +60,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() { context.xmlEditor["res/xml/main_shortcuts.xml"].use { editor -> val shortsItem = editor.file.childNodes.findElementByAttributeValueOrThrow( "android:shortcutId", - "shorts-shortcut" + "shorts-shortcut", ) shortsItem.parentNode.removeChild(shortsItem) @@ -70,7 +71,7 @@ object HideShortsComponentsResourcePatch : ResourcePatch() { context.xmlEditor["res/layout/appwidget_two_rows.xml"].use { editor -> val shortsItem = editor.file.childNodes.findElementByAttributeValueOrThrow( "android:id", - "@id/button_shorts_container" + "@id/button_shorts_container", ) shortsItem.parentNode.removeChild(shortsItem) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index f181a93d19..f4c3ebc862 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -637,6 +637,9 @@ This is because Crowdin requires temporarily flattening this file and removing t Hide stickers Stickers are hidden Stickers are shown + Hide like fountain + Like fountain is hidden + Like fountain is shown Hide like button Like button is hidden Like button is shown From e17b7d3a535133a49226de02d609051b73b50f53 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:16:00 -0400 Subject: [PATCH 2/2] Update src/main/resources/addresources/values/strings.xml Co-authored-by: oSumAtrIX --- src/main/resources/addresources/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index f4c3ebc862..7ed20f9ee5 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -638,8 +638,8 @@ This is because Crowdin requires temporarily flattening this file and removing t Stickers are hidden Stickers are shown Hide like fountain - Like fountain is hidden - Like fountain is shown + Like button fountain animation is hidden + Like button fountain animation is shown Hide like button Like button is hidden Like button is shown