diff options
author | Hailey <me@haileyok.com> | 2024-02-23 16:05:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 16:05:54 -0800 |
commit | 9c5cd391dd890d20bcf65294d9b440c18be5348e (patch) | |
tree | f2e32e8f61cd9a988023ff6db7ddda2ade409729 /src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx | |
parent | bdb63fff6d6441ba944b46de3cc234ce92313ea0 (diff) | |
download | voidsky-9c5cd391dd890d20bcf65294d9b440c18be5348e.tar.zst |
use `showControls` to show/hide live text icon on ios (#2982)
Diffstat (limited to 'src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx')
-rw-r--r-- | src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx index cf4ba71df..383490f4f 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx @@ -37,11 +37,18 @@ type Props = { onTap: () => void onZoom: (scaled: boolean) => void isScrollViewBeingDragged: boolean + showControls: boolean } const AnimatedImage = Animated.createAnimatedComponent(Image) -const ImageItem = ({imageSrc, onTap, onZoom, onRequestClose}: Props) => { +const ImageItem = ({ + imageSrc, + onTap, + onZoom, + onRequestClose, + showControls, +}: Props) => { const scrollViewRef = useAnimatedRef<Animated.ScrollView>() const translationY = useSharedValue(0) const [loaded, setLoaded] = useState(false) @@ -144,7 +151,7 @@ const ImageItem = ({imageSrc, onTap, onZoom, onRequestClose}: Props) => { accessibilityLabel={imageSrc.alt} accessibilityHint="" onLoad={() => setLoaded(true)} - enableLiveTextInteraction={!scaled} + enableLiveTextInteraction={showControls && !scaled} /> </Animated.ScrollView> </GestureDetector> |