mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-07 23:18:38 +08:00
fix: FollowedLiveStrip 背景色/头像占位/主播名跟随主题切换
This commit is contained in:
@@ -12,12 +12,14 @@ import { useAuthStore } from "../store/authStore";
|
|||||||
import { getFollowedLiveRooms } from "../services/bilibili";
|
import { getFollowedLiveRooms } from "../services/bilibili";
|
||||||
import { LivePulse } from "./LivePulse";
|
import { LivePulse } from "./LivePulse";
|
||||||
import { proxyImageUrl } from "../utils/imageUrl";
|
import { proxyImageUrl } from "../utils/imageUrl";
|
||||||
|
import { useTheme } from "../utils/theme";
|
||||||
import type { LiveRoom } from "../services/types";
|
import type { LiveRoom } from "../services/types";
|
||||||
|
|
||||||
export function FollowedLiveStrip() {
|
export function FollowedLiveStrip() {
|
||||||
const { sessdata } = useAuthStore();
|
const { sessdata } = useAuthStore();
|
||||||
const [rooms, setRooms] = useState<LiveRoom[]>([]);
|
const [rooms, setRooms] = useState<LiveRoom[]>([]);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!sessdata) return;
|
if (!sessdata) return;
|
||||||
@@ -29,7 +31,7 @@ export function FollowedLiveStrip() {
|
|||||||
if (!sessdata || rooms.length === 0) return null;
|
if (!sessdata || rooms.length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={[styles.container, { backgroundColor: theme.bg }]}>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
horizontal
|
horizontal
|
||||||
showsHorizontalScrollIndicator={false}
|
showsHorizontalScrollIndicator={false}
|
||||||
@@ -48,9 +50,9 @@ export function FollowedLiveStrip() {
|
|||||||
</View>
|
</View>
|
||||||
<Image
|
<Image
|
||||||
source={{ uri: proxyImageUrl(room.face) }}
|
source={{ uri: proxyImageUrl(room.face) }}
|
||||||
style={styles.avatar}
|
style={[styles.avatar, { backgroundColor: theme.card }]}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.name} numberOfLines={1}>
|
<Text style={[styles.name, { color: theme.text }]} numberOfLines={1}>
|
||||||
{room.uname.length > 5 ? room.uname.slice(0, 5) : room.uname}
|
{room.uname.length > 5 ? room.uname.slice(0, 5) : room.uname}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|||||||
Reference in New Issue
Block a user