取消StreamerCard组件的固定高度

This commit is contained in:
yezian 2024-01-16 22:45:39 +08:00
parent d518750660
commit 3303509c9a
5 changed files with 9 additions and 6 deletions

View File

@ -16,7 +16,7 @@ function StreamerCard({ data }) {
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
return (
<View style={tailwind("flex flex-col h-[22rem]")}>
<View style={tailwind("flex flex-col")}>
<TouchableOpacity
activeOpacity={1}
style={tailwind("flex-1 flex-col justify-around")}

View File

@ -176,7 +176,7 @@ export default function FeedStream() {
ref={flatListRef}
data={data}
renderItem={renderItem}
estimatedItemSize={352}
estimatedItemSize={287}
initialNumToRender={4}
refreshControl={
<RefreshControl

View File

@ -60,7 +60,11 @@ export default function FollowStream() {
const [offset, setOffset] = useState(0);
const [more, setMore] = useState(1);
const getData = async (type) => {
if (followMids.length === 0) return;
if (followMids.length === 0) {
setData((prev) => []);
return;
}
if (data.length === 0 && type === "bottom") return;
if (!more) return;
try {
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
@ -135,7 +139,7 @@ export default function FollowStream() {
<FlashList
data={data}
renderItem={renderItem}
estimatedItemSize={352}
estimatedItemSize={287}
initialNumToRender={4}
refreshControl={
<RefreshControl

View File

@ -1,5 +1,5 @@
import { View, Text, Image, TouchableOpacity } from "react-native";
import React, { useState, useEffect, useCallback } from "react";
import React, { useState, useCallback } from "react";
import { useTailwind } from "tailwind-rn";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { Divider, Icon } from "@rneui/themed";

View File

@ -19,7 +19,6 @@ import Toast from "react-native-toast-message";
import * as Clipboard from "expo-clipboard";
import { generateSignature } from "../../../utils/crypto";
//todo:线
export default function HaveNotAddWechat({}) {
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";