Fix nullability of resolveCustomIcon return value

Fix #1181
This commit is contained in:
MM20 2025-04-01 23:00:41 +02:00
parent 6e835042a1
commit b2cf7f5e5e
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -166,9 +166,9 @@ class IconService(
} }
} }
fun resolveCustomIcon(searchable: SavableSearchable, size: Int, customIcon: CustomIcon?): Flow<LauncherIcon> { fun resolveCustomIcon(searchable: SavableSearchable, size: Int, customIcon: CustomIcon?): Flow<LauncherIcon?> {
return combine(iconProviders, transformations) { providers, transformations -> return combine(iconProviders, transformations) { providers, transformations ->
var icon = cache.get(searchable.key + customIcon.hashCode() + providers.hashCode() + transformations.hashCode()) var icon: LauncherIcon? = cache.get(searchable.key + customIcon.hashCode() + providers.hashCode() + transformations.hashCode())
if (icon != null) { if (icon != null) {
return@combine icon return@combine icon
} }