feat(YouTube - Hide Shorts components): Add option to hide like fountain (#3731)

Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
This commit is contained in:
oSumAtrIX 2024-10-02 02:38:49 +02:00 committed by GitHub
parent d56e2163b0
commit 00a99dd13b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -637,6 +637,9 @@ This is because Crowdin requires temporarily flattening this file and removing t
<string name="revanced_hide_shorts_stickers_title">Hide stickers</string>
<string name="revanced_hide_shorts_stickers_summary_on">Stickers are hidden</string>
<string name="revanced_hide_shorts_stickers_summary_off">Stickers are shown</string>
<string name="revanced_hide_shorts_like_fountain_title">Hide like fountain</string>
<string name="revanced_hide_shorts_like_fountain_summary_on">Like button fountain animation is hidden</string>
<string name="revanced_hide_shorts_like_fountain_summary_off">Like button fountain animation is shown</string>
<string name="revanced_hide_shorts_like_button_title">Hide like button</string>
<string name="revanced_hide_shorts_like_button_summary_on">Like button is hidden</string>
<string name="revanced_hide_shorts_like_button_summary_off">Like button is shown</string>