diff options
author | dan <dan.abramov@gmail.com> | 2024-10-31 16:24:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 16:24:15 +0000 |
commit | 1e32327de0d46332739761ad831141b6f6a2fd60 (patch) | |
tree | ef9ad194e7f24c016459fc066d968365753c1a52 /src/state/lightbox.tsx | |
parent | 6f4703e814723ba8301435cba58f989c9aea3d3f (diff) | |
download | voidsky-1e32327de0d46332739761ad831141b6f6a2fd60.tar.zst |
Measure tapped image coordinates before opening lightbox (#6001)
* Measure image on press * Pass dimensions to the lightbox component
Diffstat (limited to 'src/state/lightbox.tsx')
-rw-r--r-- | src/state/lightbox.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state/lightbox.tsx b/src/state/lightbox.tsx index 0760d2c96..eb5a88864 100644 --- a/src/state/lightbox.tsx +++ b/src/state/lightbox.tsx @@ -1,4 +1,5 @@ import React from 'react' +import type {MeasuredDimensions} from 'react-native-reanimated' import {AppBskyActorDefs} from '@atproto/api' import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' @@ -6,6 +7,7 @@ import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' type ProfileImageLightbox = { type: 'profile-image' profile: AppBskyActorDefs.ProfileViewDetailed + thumbDims: null } type ImagesLightboxItem = { @@ -17,6 +19,7 @@ type ImagesLightboxItem = { type ImagesLightbox = { type: 'images' images: ImagesLightboxItem[] + thumbDims: MeasuredDimensions | null index: number } |