From 42abd97f61b6813ab7dc6126d167b4130532326a Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 9 Nov 2024 22:41:14 +0000 Subject: [Lightbox] Always rely on Expo Image cache (#6189) * Inline useImageAspectRatio * Switch AutoSizedImage to read dimensions from Expo Image cache * Include thumbnail dimensions in image data * Use dims from Expo Image cache in lightbox * Fix wiring so all thumbnails get dimensions * Fix type * Oops --- src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx') diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx index 543fad772..b41e16383 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx @@ -5,6 +5,7 @@ import {View} from 'react-native' import {PanGesture} from 'react-native-gesture-handler' import {SharedValue} from 'react-native-reanimated' +import {Dimensions} from '#/lib/media/types' import { Dimensions as ImageDimensions, ImageSource, @@ -16,6 +17,7 @@ type Props = { onRequestClose: () => void onTap: () => void onZoom: (scaled: boolean) => void + onLoad: (dims: Dimensions) => void isScrollViewBeingDragged: boolean showControls: boolean measureSafeArea: () => { -- cgit 1.4.1