Fixed that ImageBitmap has been created very often
This commit is contained in:
parent
bd9229bb64
commit
673ca08974
|
@ -18,7 +18,7 @@ fun IconForUrl(iconUrl: String, contentDescription: String, modifier: Modifier =
|
||||||
|
|
||||||
val coroutineScope = rememberCoroutineScope()
|
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) {
|
coroutineScope.launch(Dispatchers.IOorDefault) {
|
||||||
val received = imageCache.getImageBitmap(iconUrl)
|
val received = imageCache.getImageBitmap(iconUrl)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue