fix(Custom branding icon): patch options not available

This commit is contained in:
inotia00
2023-12-06 13:50:20 +09:00
parent 47610bba7d
commit 9b15d234e3
2 changed files with 4 additions and 4 deletions

View File

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

View File

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