Fix custom icons not updated immediately

This commit is contained in:
MM20 2023-08-06 14:14:10 +02:00
parent 5704bdd0d3
commit 24997b8dcc
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -142,7 +142,7 @@ class IconService(
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon> {
val customIcon = customAttributesRepository.getCustomIcon(searchable)
return combine(iconProviders, transformations, customIcon) { providers, transformations, ci ->
var icon = cache.get(searchable.key + customIcon.hashCode())
var icon = cache.get(searchable.key + ci.hashCode())
if (icon != null) {
return@combine icon
}
@ -155,7 +155,7 @@ class IconService(
if (icon != null) {
icon = icon.transform(transforms)
cache.put(searchable.key + customIcon.hashCode(), icon)
cache.put(searchable.key + ci.hashCode(), icon)
}
return@combine icon
}