取消StreamerCard组件的固定高度
This commit is contained in:
parent
d518750660
commit
3303509c9a
|
@ -16,7 +16,7 @@ function StreamerCard({ data }) {
|
||||||
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={tailwind("flex flex-col h-[22rem]")}>
|
<View style={tailwind("flex flex-col")}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
activeOpacity={1}
|
activeOpacity={1}
|
||||||
style={tailwind("flex-1 flex-col justify-around")}
|
style={tailwind("flex-1 flex-col justify-around")}
|
||||||
|
|
|
@ -176,7 +176,7 @@ export default function FeedStream() {
|
||||||
ref={flatListRef}
|
ref={flatListRef}
|
||||||
data={data}
|
data={data}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
estimatedItemSize={352}
|
estimatedItemSize={287}
|
||||||
initialNumToRender={4}
|
initialNumToRender={4}
|
||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControl
|
<RefreshControl
|
||||||
|
|
|
@ -60,7 +60,11 @@ export default function FollowStream() {
|
||||||
const [offset, setOffset] = useState(0);
|
const [offset, setOffset] = useState(0);
|
||||||
const [more, setMore] = useState(1);
|
const [more, setMore] = useState(1);
|
||||||
const getData = async (type) => {
|
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;
|
if (!more) return;
|
||||||
try {
|
try {
|
||||||
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
const apiUrl = process.env.EXPO_PUBLIC_API_URL;
|
||||||
|
@ -135,7 +139,7 @@ export default function FollowStream() {
|
||||||
<FlashList
|
<FlashList
|
||||||
data={data}
|
data={data}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
estimatedItemSize={352}
|
estimatedItemSize={287}
|
||||||
initialNumToRender={4}
|
initialNumToRender={4}
|
||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControl
|
<RefreshControl
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { View, Text, Image, TouchableOpacity } from "react-native";
|
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 { useTailwind } from "tailwind-rn";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
import { Divider, Icon } from "@rneui/themed";
|
import { Divider, Icon } from "@rneui/themed";
|
||||||
|
|
|
@ -19,7 +19,6 @@ import Toast from "react-native-toast-message";
|
||||||
import * as Clipboard from "expo-clipboard";
|
import * as Clipboard from "expo-clipboard";
|
||||||
import { generateSignature } from "../../../utils/crypto";
|
import { generateSignature } from "../../../utils/crypto";
|
||||||
|
|
||||||
//todo:等待接口上线,完善样式,测试
|
|
||||||
export default function HaveNotAddWechat({}) {
|
export default function HaveNotAddWechat({}) {
|
||||||
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue