From 00a99dd13be6e5c44fa691d74c92b23ce6ba659d Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 2 Oct 2024 02:38:49 +0200 Subject: [PATCH] feat(YouTube - Hide Shorts components): Add option to hide like fountain (#3731) Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> --- .../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 c3ce3a0cc..9d3c8464e 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 f181a93d1..7ed20f9ee 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 button fountain animation is hidden + Like button fountain animation is shown Hide like button Like button is hidden Like button is shown