mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-05-31 02:29:15 +02:00
Fixing the position of the image loading animation
This commit is contained in:
parent
a720a636d3
commit
9c715dd381
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user