Fixing the position of the image loading animation

This commit is contained in:
Vitor Pamplona 2023-04-22 15:02:33 -04:00
parent a720a636d3
commit 9c715dd381

View File

@ -148,6 +148,14 @@ fun ZoomableContentView(content: ZoomableContent, images: List<ZoomableContent>
)
if (content is ZoomableImage) {
if (imageState !is AsyncImagePainter.State.Success) {
if (content.bluehash != null) {
DisplayBlueHash(content, mainImageModifier)
} else {
DisplayUrlWithLoadingSymbol(content)
}
}
Box() {
AsyncImage(
model = content.url,
@ -162,13 +170,7 @@ fun ZoomableContentView(content: ZoomableContent, images: List<ZoomableContent>
}
)
if (imageState !is AsyncImagePainter.State.Success) {
if (content.bluehash != null) {
DisplayBlueHash(content, mainImageModifier)
} else {
DisplayUrlWithLoadingSymbol(content)
}
} else {
if (imageState is AsyncImagePainter.State.Success) {
HashVerificationSymbol(verifiedHash, Modifier.align(Alignment.TopEnd))
}
}
@ -183,7 +185,7 @@ fun ZoomableContentView(content: ZoomableContent, images: List<ZoomableContent>
@Composable
private fun DisplayUrlWithLoadingSymbol(content: ZoomableContent) {
ClickableUrl(urlText = "$content ", url = content.url)
ClickableUrl(urlText = "${content.url} ", url = content.url)
val myId = "inlineContent"
val emptytext = buildAnnotatedString {