From 814d05812aed8efa17863e6ac49802de7b3c7ffb Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sun, 14 May 2023 18:59:33 -0400 Subject: [PATCH] Fixes image cropping opening the image dialog. --- .../amethyst/ui/components/ZoomableContentView.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/components/ZoomableContentView.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/components/ZoomableContentView.kt index bdecb38e2..6eed48772 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/components/ZoomableContentView.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/components/ZoomableContentView.kt @@ -219,7 +219,7 @@ private fun LocalImageView( it.aspectRatio(ratio, maxHeight.isFinite) } } - val contentScale = if (maxHeight.isFinite) ContentScale.Fit else ContentScale.FillWidth + val contentScale = if (maxHeight.isFinite) ContentScale.Inside else ContentScale.FillWidth if (content.localFile != null && content.localFile.exists()) { AsyncImage( @@ -285,7 +285,7 @@ private fun UrlImageView( this.aspectRatio(ratio, maxHeight.isFinite) } ?: this } - val contentScale = if (maxHeight.isFinite) ContentScale.Fit else ContentScale.FillWidth + val contentScale = if (maxHeight.isFinite) ContentScale.Inside else ContentScale.FillWidth AsyncImage( model = content.url,