diff --git a/app/video/[bvid].tsx b/app/video/[bvid].tsx index f1fef41..62604de 100644 --- a/app/video/[bvid].tsx +++ b/app/video/[bvid].tsx @@ -209,7 +209,7 @@ export default function VideoDetailScreen() { onPress={() => router.push(`/video/${item.bvid}` as any)} activeOpacity={0.85} > - + + {item.member.uname} - {item.content.message} + {item.content.message} {formatTime(item.ctime)} diff --git a/components/DanmakuList.tsx b/components/DanmakuList.tsx index e93416e..f7c990f 100644 --- a/components/DanmakuList.tsx +++ b/components/DanmakuList.tsx @@ -12,6 +12,7 @@ import { import { Ionicons } from "@expo/vector-icons"; import { DanmakuItem } from "../services/types"; import { danmakuColorToCss } from "../utils/danmaku"; +import { useTheme } from "../utils/theme"; interface Props { danmakus: DanmakuItem[]; @@ -65,6 +66,7 @@ export default function DanmakuList({ maxItems = 100, giftCounts, }: Props) { + const theme = useTheme(); const flatListRef = useRef(null); const [displayedItems, setDisplayedItems] = useState([]); const [unseenCount, setUnseenCount] = useState(0); @@ -213,7 +215,7 @@ export default function DanmakuList({ const guard = item.guardLevel ? GUARD_LABELS[item.guardLevel] : null; const timeStr = formatLiveTime(item.timeline); return ( - + {timeStr ? ( {timeStr} ) : null} @@ -240,27 +242,27 @@ export default function DanmakuList({ {item.uname ?? "匿名"} - + {item.text} ); - }, []); + }, [theme]); // ─── Video mode render (original bubble) ─────────────────────────────────── const renderVideoItem = useCallback(({ item }: { item: DisplayedDanmaku }) => { const dotColor = danmakuColorToCss(item.color); return ( - + - + {item.text} {formatTimestamp(item.time)} ); - }, []); + }, [theme]); const keyExtractor = useCallback( (item: DisplayedDanmaku) => String(item._key), @@ -268,7 +270,7 @@ export default function DanmakuList({ ); return ( - + {!hideHeader && (