From b85999a68b8fe120e626bb0c0517067c4d1c9a9b Mon Sep 17 00:00:00 2001 From: yezian Date: Mon, 8 Jan 2024 02:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E5=92=8C=E5=85=B3=E6=B3=A8?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E5=87=BA4=E4=B8=AA=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8D=A1=E7=89=87=E6=B8=B2=E6=9F=93=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=9B=E7=9B=B8=E5=86=8C=E8=87=B3=E5=B0=912=E5=BC=A0?= =?UTF-8?q?=E5=9B=BE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/StreamerCard/index.jsx | 36 ++++++++++--------- screeens/EditStreamerProfile/index.jsx | 14 ++++++-- screeens/Stream/FeedStream/index.jsx | 4 +-- screeens/Stream/FollowStream/index.jsx | 14 ++++---- .../StreamerVerificationForm/index.jsx | 12 ++++++- 5 files changed, 52 insertions(+), 28 deletions(-) diff --git a/components/StreamerCard/index.jsx b/components/StreamerCard/index.jsx index fe55bc7..7684a8c 100644 --- a/components/StreamerCard/index.jsx +++ b/components/StreamerCard/index.jsx @@ -4,7 +4,7 @@ import { TouchableOpacity, Image as NativeImage, } from "react-native"; -import React, { memo, useContext } from "react"; +import React, { memo, useContext, useMemo } from "react"; import { useTailwind } from "tailwind-rn"; import { Image } from "expo-image"; import { Video, ResizeMode } from "expo-av"; @@ -17,6 +17,8 @@ function StreamerCard({ data, screen }) { const showVideo = useContext( screen === "feed" ? FeedShowVideoContext : SameCityShowVideoContext ); + const isPlaying = useMemo(() => showVideo.includes(data?.mid), [showVideo]); + const tailwind = useTailwind(); const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk"; @@ -56,7 +58,7 @@ function StreamerCard({ data, screen }) { ), }} > - {data?.gender === 0 ? ( + {data?.gender === 1 ? ( @@ -107,21 +109,23 @@ function StreamerCard({ data, screen }) { transition={1000} placeholder={blurhash} cachePolicy="disk" - style={tailwind("w-full h-full z-0")} + style={ + isPlaying + ? tailwind("w-full h-full z-0 absolute") + : tailwind("w-full h-full z-20 absolute") + } + /> +