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")
+ }
+ />
+
- {showVideo.includes(data?.mid) && (
-
- )}
{data?.album?.images.map((item, index) => {
diff --git a/screeens/EditStreamerProfile/index.jsx b/screeens/EditStreamerProfile/index.jsx
index 42a728b..0b10bc4 100644
--- a/screeens/EditStreamerProfile/index.jsx
+++ b/screeens/EditStreamerProfile/index.jsx
@@ -365,7 +365,7 @@ export default function EditStreamerProfile({ navigation, route }) {
if (photos.length === 0 && oldPhotos.length === 0) {
Toast.show({
type: "error",
- text1: "请确保相册中至少有一张图片",
+ text1: "请确保相册中至少有2张图片",
topOffset: 60,
});
return;
@@ -383,6 +383,16 @@ export default function EditStreamerProfile({ navigation, route }) {
const album = {
image_ids: [...oldPhotosIds, ...newPhotosIds?.image_ids],
};
+ //相册不得低于2张
+ if (album.image_ids.length < 2) {
+ Toast.show({
+ type: "error",
+ text1: "相册至少需要上传2张照片哦!",
+ topOffset: 60,
+ });
+ setIsSubmitting(false);
+ return;
+ }
//相册不得超过9张
if (album.image_ids.length > 9) {
Toast.show({
@@ -804,7 +814,7 @@ export default function EditStreamerProfile({ navigation, route }) {
- 将在“主页”展示(最多9张)
+ 将在“主页”展示(2~9张)
diff --git a/screeens/Stream/FeedStream/index.jsx b/screeens/Stream/FeedStream/index.jsx
index 990e179..5ca12d3 100644
--- a/screeens/Stream/FeedStream/index.jsx
+++ b/screeens/Stream/FeedStream/index.jsx
@@ -60,7 +60,7 @@ export default function FeedStream() {
//查询的起始索引
const [startIndex, setStartIndex] = useState(0);
// 定义每次取多少个用户ID
- const batchSize = 10;
+ const batchSize = 4;
//获取新数据
const [data, setData] = useState([]);
const [isEnd, setIsEnd] = useState(true);
@@ -188,7 +188,7 @@ export default function FeedStream() {
data={data}
renderItem={renderItem}
estimatedItemSize={352}
- initialNumToRender={10}
+ initialNumToRender={4}
refreshControl={
- 将在“主页”展示(最多9张)
+ 将在“主页”展示(2~9张)