Fix custom icons not updated immediately
This commit is contained in:
parent
5704bdd0d3
commit
24997b8dcc
@ -142,7 +142,7 @@ class IconService(
|
|||||||
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon> {
|
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon> {
|
||||||
val customIcon = customAttributesRepository.getCustomIcon(searchable)
|
val customIcon = customAttributesRepository.getCustomIcon(searchable)
|
||||||
return combine(iconProviders, transformations, customIcon) { providers, transformations, ci ->
|
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) {
|
if (icon != null) {
|
||||||
return@combine icon
|
return@combine icon
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ class IconService(
|
|||||||
if (icon != null) {
|
if (icon != null) {
|
||||||
icon = icon.transform(transforms)
|
icon = icon.transform(transforms)
|
||||||
|
|
||||||
cache.put(searchable.key + customIcon.hashCode(), icon)
|
cache.put(searchable.key + ci.hashCode(), icon)
|
||||||
}
|
}
|
||||||
return@combine icon
|
return@combine icon
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user