Image seems to better support Bitmap models than Async Image

This commit is contained in:
Vitor Pamplona
2023-02-13 08:45:32 -05:00
parent 80bede648f
commit a618e84d32
@@ -1,6 +1,7 @@
package com.vitorpamplona.amethyst.ui.note package com.vitorpamplona.amethyst.ui.note
import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.border import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
@@ -408,8 +409,8 @@ fun NoteAuthorPicture(
.width(size) .width(size)
.height(size)) { .height(size)) {
if (author == null) { if (author == null) {
AsyncImage( Image(
model = rememberAsyncImagePainter(RoboHashCache.get(ctx, "ohno")), painter = rememberAsyncImagePainter(RoboHashCache.get(ctx, "ohnothisauthorisnotfound")),
contentDescription = "Unknown Author", contentDescription = "Unknown Author",
modifier = pictureModifier modifier = pictureModifier
.fillMaxSize(1f) .fillMaxSize(1f)