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..99d6d1443 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 @@ -61,7 +61,8 @@ object CustomBrandingIconPatch : ResourcePatch() { override fun execute(context: ResourceContext) { AppIcon?.let { appIcon -> - if (!availableIcon.containsKey(appIcon)) { + val appIconValue = appIcon.lowercase().replace(" ","_") + if (!availableIcon.containsValue(appIconValue)) { mipmapDirectories.map { directory -> ResourceGroup( directory, *mipmapIconResourceFileNames @@ -83,7 +84,6 @@ object CustomBrandingIconPatch : ResourcePatch() { } } } else { - val appIconValue = availableIcon[appIcon] + "" val resourcePath = "music/branding/$appIconValue" // change launcher icon. 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 170d2ce87..c1208f924 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 @@ -106,7 +106,8 @@ object CustomBrandingIconPatch : ResourcePatch() { override fun execute(context: ResourceContext) { AppIcon?.let { appIcon -> - if (!availableIcon.containsKey(appIcon)) { + val appIconValue = appIcon.lowercase().replace(" ","_") + if (!availableIcon.containsValue(appIconValue)) { mipmapDirectories.map { directory -> ResourceGroup( directory, *mipmapIconResourceFileNames @@ -129,7 +130,6 @@ object CustomBrandingIconPatch : ResourcePatch() { context.updatePatchStatusIcon("custom") } } else { - val appIconValue = availableIcon[appIcon] + "" val resourcePath = "youtube/branding/$appIconValue" // change launcher icon.