From 8b87bc72a9f0863320d2c3e577103e6969ccd4ac Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Wed, 6 Dec 2023 03:12:08 +0900 Subject: [PATCH] fix(YouTube/Custom branding icon YouTube): If the user changed to a custom icon through `Patch Options`, this was not reflected in `Patch Information` --- .../music/general/branding/icon/CustomBrandingIconPatch.kt | 1 + .../youtube/layout/branding/icon/CustomBrandingIconPatch.kt | 2 ++ src/main/resources/youtube/settings/values-v21/strings.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/main/kotlin/app/revanced/patches/music/general/branding/icon/CustomBrandingIconPatch.kt b/src/main/kotlin/app/revanced/patches/music/general/branding/icon/CustomBrandingIconPatch.kt index 95a39e04b..75c815906 100644 --- a/src/main/kotlin/app/revanced/patches/music/general/branding/icon/CustomBrandingIconPatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/general/branding/icon/CustomBrandingIconPatch.kt @@ -57,6 +57,7 @@ object CustomBrandingIconPatch : ResourcePatch() { .split("\n") .joinToString("\n") { it.trimIndent() } // Remove the leading whitespace from each line. .trimIndent(), // Remove the leading newline. + required = true ) override fun execute(context: ResourceContext) { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/CustomBrandingIconPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/CustomBrandingIconPatch.kt index b5cac813c..aeeca9f80 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/CustomBrandingIconPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/CustomBrandingIconPatch.kt @@ -103,6 +103,7 @@ object CustomBrandingIconPatch : ResourcePatch() { .split("\n") .joinToString("\n") { it.trimIndent() } // Remove the leading whitespace from each line. .trimIndent(), // Remove the leading newline. + required = true ) override fun execute(context: ResourceContext) { @@ -127,6 +128,7 @@ object CustomBrandingIconPatch : ResourcePatch() { ) } } + context.updatePatchStatusIcon("custom") } } else { val appIconValue = availableIcon[appIcon] + "" diff --git a/src/main/resources/youtube/settings/values-v21/strings.xml b/src/main/resources/youtube/settings/values-v21/strings.xml index a422fe81d..819f89d24 100644 --- a/src/main/resources/youtube/settings/values-v21/strings.xml +++ b/src/main/resources/youtube/settings/values-v21/strings.xml @@ -67,6 +67,7 @@ Since it hasn't been tested, it most likely won't work." @string/revanced_hide_shorts_player_subscriptions_button_title Stock + Custom Stock MMT Revancify Blue