From 206df2ab801d211a412f9ce3694d90bdd053caaa Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 6 Nov 2024 00:21:35 +0000 Subject: Remove SCREEN from lightbox layout (#6124) * Assign an ID to lightbox and use it as a key * Consolidate lightbox props into an object * Remove unused prop * Move SafeAreaView declaration * Keep SafeAreaView always mounted When exploring Android animation, I noticed its content jumps on the first frame. I think this should help prevent that. * Pass safe area down for measurement * Remove dependency on SCREEN in Android event handlers * Remove dependency on SCREEN in iOS event handlers * Remove dependency on SCREEN on iOS * Remove dependency on SCREEN on Android * Remove dependency on JS calc in controls * Use flex for iOS layout --- 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 4cb7903ef..383bec995 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx @@ -2,6 +2,7 @@ import React from 'react' import {View} from 'react-native' +import {AnimatedRef} from 'react-native-reanimated' import {ImageSource} from '../../@types' @@ -12,6 +13,7 @@ type Props = { onZoom: (scaled: boolean) => void isScrollViewBeingDragged: boolean showControls: boolean + safeAreaRef: AnimatedRef } const ImageItem = (_props: Props) => { -- cgit 1.4.1