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