From 42e6ff600bcc08bba5398d63b4981c9050aa6c4f Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Tue, 15 Jul 2025 01:27:29 +0800 Subject: [PATCH] fix: replace TouchableOpacity with NativePressable for improved touch handling --- apps/mobile/src/components/ui/carousel/MediaCarousel.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx b/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx index eea79dc80..3f6342acc 100644 --- a/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx +++ b/apps/mobile/src/components/ui/carousel/MediaCarousel.tsx @@ -3,7 +3,7 @@ import type { MediaModel } from "@follow/database/schemas/types" import type { ImageSource } from "expo-image" import type { Ref } from "react" import { useEffect, useState } from "react" -import { ScrollView, TouchableOpacity, View } from "react-native" +import { ScrollView, View } from "react-native" import Animated, { interpolateColor, useAnimatedStyle, @@ -16,6 +16,7 @@ import { EntryGridFooter } from "@/src/modules/entry-content/EntryGridFooter" import { Image } from "../image/Image" import { ImageContextMenu } from "../image/ImageContextMenu" import { getAllSources } from "../image/utils" +import { NativePressable } from "../pressable/NativePressable" import { VideoPlayer } from "../video/VideoPlayer" export const MediaCarousel = ({ @@ -70,7 +71,7 @@ export const MediaCarousel = ({ height: 400, } const ImageItem = ( - { const [placeholder] = getAllSources({ uri: imageUrl }, proxy) onPreview?.(index, { blurhash: m.blurhash, ...placeholder }) @@ -84,7 +85,7 @@ export const MediaCarousel = ({ aspectRatio={aspectRatio} placeholderContentFit="cover" /> - + ) if (m.type === "photo") {