From a0ee1fbc9f31fe6a9f0aeb6c6fbbbfae0b2b2e97 Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Tue, 29 Aug 2023 23:08:13 +0200 Subject: [PATCH] Include providers and transformations in icon cache hash --- .../src/main/java/de/mm20/launcher2/icons/IconService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/icons/src/main/java/de/mm20/launcher2/icons/IconService.kt b/services/icons/src/main/java/de/mm20/launcher2/icons/IconService.kt index 5fdcc9b1..15a403ee 100644 --- a/services/icons/src/main/java/de/mm20/launcher2/icons/IconService.kt +++ b/services/icons/src/main/java/de/mm20/launcher2/icons/IconService.kt @@ -142,7 +142,7 @@ class IconService( fun getIcon(searchable: SavableSearchable, size: Int): Flow { val customIcon = customAttributesRepository.getCustomIcon(searchable) return combine(iconProviders, transformations, customIcon) { providers, transformations, ci -> - var icon = cache.get(searchable.key + ci.hashCode()) + var icon = cache.get(searchable.key + ci.hashCode() + providers.hashCode() + transformations.hashCode()) if (icon != null) { return@combine icon } @@ -155,7 +155,7 @@ class IconService( if (icon != null) { icon = icon.transform(transforms) - cache.put(searchable.key + ci.hashCode(), icon) + cache.put(searchable.key + ci.hashCode() + providers.hashCode() + transformations.hashCode(), icon) } return@combine icon }