about summary refs log tree commit diff
path: root/src/view/com/lightbox/ImageViewing/components/ImageItem
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-11-28 23:29:45 +0000
committerGitHub <noreply@github.com>2024-11-28 23:29:45 +0000
commit5f4a0f2881b9420f3a3f3fb6527352f58a99d9ea (patch)
tree646756fc73e3f16f06f22c623e8e2c48e30c8834 /src/view/com/lightbox/ImageViewing/components/ImageItem
parentd08ce0d473374c0720d018e8fc8ed550ed32544a (diff)
downloadvoidsky-5f4a0f2881b9420f3a3f3fb6527352f58a99d9ea.tar.zst
"Contain" images with missing dimensions instead of cropping them (#6828)
* Show unknown aspect as "contain" for autosize

* Fix a flash of wrong position when opening in lightbox

* Fix last frame flash on Android
Diffstat (limited to 'src/view/com/lightbox/ImageViewing/components/ImageItem')
-rw-r--r--src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
index 8e046e5ba..925158773 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
@@ -392,9 +392,9 @@ const ImageItem = ({
           <Animated.View style={imageCropStyle}>
             <Animated.View style={imageStyle}>
               <Image
-                contentFit="cover"
+                contentFit="contain"
                 source={{uri: imageSrc.uri}}
-                placeholderContentFit="cover"
+                placeholderContentFit="contain"
                 placeholder={{uri: imageSrc.thumbUri}}
                 accessibilityLabel={imageSrc.alt}
                 onLoad={