From 673ca089742dd200be64902f7aa58adcdfc8ebe4 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 12 Sep 2024 11:06:32 +0200 Subject: [PATCH] Fixed that ImageBitmap has been created very often --- .../kotlin/net/codinux/banking/ui/composables/IconFromUrl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/IconFromUrl.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/IconFromUrl.kt index e2da819..d57c753 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/IconFromUrl.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/IconFromUrl.kt @@ -18,7 +18,7 @@ fun IconForUrl(iconUrl: String, contentDescription: String, modifier: Modifier = val coroutineScope = rememberCoroutineScope() - if (iconUrl.endsWith(".svg") == false) { // SVG is not supported on Android + if (imageBitmap == null && iconUrl.endsWith(".svg") == false) { // SVG is not supported on Android coroutineScope.launch(Dispatchers.IOorDefault) { val received = imageCache.getImageBitmap(iconUrl)