feat:直播 Tab 顶部显示关注主播在线列表

This commit is contained in:
Developer
2026-03-19 20:46:16 +08:00
parent c0b7b8e974
commit f5d49cd3f9
3 changed files with 138 additions and 24 deletions

View File

@@ -39,6 +39,7 @@ import {
type LiveRow,
} from "../utils/videoRows";
import { BigVideoCard } from "../components/BigVideoCard";
import { FollowedLiveStrip } from "../components/FollowedLiveStrip";
import type { LiveRoom } from "../services/types";
const HEADER_H = 44;
@@ -339,33 +340,36 @@ export default function HomeScreen() {
}}
renderItem={renderLiveItem}
ListHeaderComponent={
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
style={styles.areaTabRow}
contentContainerStyle={styles.areaTabContent}
>
{LIVE_AREAS.map((area) => (
<TouchableOpacity
key={area.id}
style={[
styles.areaTab,
liveAreaId === area.id && styles.areaTabActive,
]}
onPress={() => handleLiveAreaPress(area.id)}
activeOpacity={0.7}
>
<Text
<View>
<FollowedLiveStrip />
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
style={styles.areaTabRow}
contentContainerStyle={styles.areaTabContent}
>
{LIVE_AREAS.map((area) => (
<TouchableOpacity
key={area.id}
style={[
styles.areaTabText,
liveAreaId === area.id && styles.areaTabTextActive,
styles.areaTab,
liveAreaId === area.id && styles.areaTabActive,
]}
onPress={() => handleLiveAreaPress(area.id)}
activeOpacity={0.7}
>
{area.name}
</Text>
</TouchableOpacity>
))}
</ScrollView>
<Text
style={[
styles.areaTabText,
liveAreaId === area.id && styles.areaTabTextActive,
]}
>
{area.name}
</Text>
</TouchableOpacity>
))}
</ScrollView>
</View>
}
refreshControl={
<RefreshControl