Fixed that ImageBitmap has been created very often

This commit is contained in:
dankito 2024-09-12 11:06:32 +02:00
parent bd9229bb64
commit 673ca08974
1 changed files with 1 additions and 1 deletions

View File

@ -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)