mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-01 11:19:17 +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 (content is ZoomableImage) {
|
||||||
|
if (imageState !is AsyncImagePainter.State.Success) {
|
||||||
|
if (content.bluehash != null) {
|
||||||
|
DisplayBlueHash(content, mainImageModifier)
|
||||||
|
} else {
|
||||||
|
DisplayUrlWithLoadingSymbol(content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Box() {
|
Box() {
|
||||||
AsyncImage(
|
AsyncImage(
|
||||||
model = content.url,
|
model = content.url,
|
||||||
@ -162,13 +170,7 @@ fun ZoomableContentView(content: ZoomableContent, images: List<ZoomableContent>
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (imageState !is AsyncImagePainter.State.Success) {
|
if (imageState is AsyncImagePainter.State.Success) {
|
||||||
if (content.bluehash != null) {
|
|
||||||
DisplayBlueHash(content, mainImageModifier)
|
|
||||||
} else {
|
|
||||||
DisplayUrlWithLoadingSymbol(content)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
HashVerificationSymbol(verifiedHash, Modifier.align(Alignment.TopEnd))
|
HashVerificationSymbol(verifiedHash, Modifier.align(Alignment.TopEnd))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,7 +185,7 @@ fun ZoomableContentView(content: ZoomableContent, images: List<ZoomableContent>
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun DisplayUrlWithLoadingSymbol(content: ZoomableContent) {
|
private fun DisplayUrlWithLoadingSymbol(content: ZoomableContent) {
|
||||||
ClickableUrl(urlText = "$content ", url = content.url)
|
ClickableUrl(urlText = "${content.url} ", url = content.url)
|
||||||
|
|
||||||
val myId = "inlineContent"
|
val myId = "inlineContent"
|
||||||
val emptytext = buildAnnotatedString {
|
val emptytext = buildAnnotatedString {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user