diff options
Diffstat (limited to 'src/view/com/lightbox')
-rw-r--r-- | src/view/com/lightbox/ImageViewing/index.tsx | 3 | ||||
-rw-r--r-- | src/view/com/lightbox/Lightbox.tsx | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx index 1432b34ff..0d0ac4df1 100644 --- a/src/view/com/lightbox/ImageViewing/index.tsx +++ b/src/view/com/lightbox/ImageViewing/index.tsx @@ -11,6 +11,7 @@ import React, {ComponentType, useCallback, useMemo, useState} from 'react' import {Platform, StyleSheet, View} from 'react-native' import PagerView from 'react-native-pager-view' +import {MeasuredDimensions} from 'react-native-reanimated' import Animated, {useAnimatedStyle, withSpring} from 'react-native-reanimated' import {Edge, SafeAreaView} from 'react-native-safe-area-context' @@ -20,6 +21,7 @@ import ImageItem from './components/ImageItem/ImageItem' type Props = { images: ImageSource[] + thumbDims: MeasuredDimensions | null initialImageIndex: number visible: boolean onRequestClose: () => void @@ -32,6 +34,7 @@ const DEFAULT_BG_COLOR = '#000' function ImageViewing({ images, + thumbDims: _thumbDims, // TODO: Pass down and use for animation. initialImageIndex, visible, onRequestClose, diff --git a/src/view/com/lightbox/Lightbox.tsx b/src/view/com/lightbox/Lightbox.tsx index a7f8fed77..891be3f9c 100644 --- a/src/view/com/lightbox/Lightbox.tsx +++ b/src/view/com/lightbox/Lightbox.tsx @@ -35,6 +35,7 @@ export function Lightbox() { {uri: opts.profile.avatar || '', thumbUri: opts.profile.avatar || ''}, ]} initialImageIndex={0} + thumbDims={opts.thumbDims} visible onRequestClose={onClose} FooterComponent={LightboxFooter} @@ -46,6 +47,7 @@ export function Lightbox() { <ImageView images={opts.images.map(img => ({...img}))} initialImageIndex={opts.index} + thumbDims={opts.thumbDims} visible onRequestClose={onClose} FooterComponent={LightboxFooter} |