feat(ui): unify design system to Twitter/X style across screens and improve message handling
Redesign multiple screens and components from card-based responsive design to Twitter/X flat design: - UserProfileHeader: adopt Twitter/X style with larger icons, simplified buttons, and block functionality - AppBackButton: update to chevron-left icon with larger size, remove background styling - Update SettingsScreen, EditProfileScreen, and UserProfileScreen with flat layout approach - ConversationListRow: convert from bordered cards to flat list rows with updated typography Improve message system with WebSocket notification handling: - Add real-time system unread count updates via WebSocket - Track lastSystemMessageAt for accurate system message timestamps - Add notification deduplication and read-status filtering - Combine system and conversation unread counts in background sync - Clear system notifications from notification center on mark as read
This commit is contained in:
@@ -376,6 +376,18 @@ export class MessageSyncService implements IMessageSyncService {
|
||||
|
||||
store.setUnreadCount(totalUnread, systemUnread);
|
||||
|
||||
// 获取最后一条系统通知的时间
|
||||
if (systemUnread > 0) {
|
||||
try {
|
||||
const latestSystemMsg = await messageService.getSystemMessagesCursor({ cursor: '', page_size: 1 });
|
||||
if (latestSystemMsg?.list?.[0]?.created_at) {
|
||||
store.setLastSystemMessageAt(latestSystemMsg.list[0].created_at);
|
||||
}
|
||||
} catch {
|
||||
// 获取最后系统通知时间失败,不影响主流程
|
||||
}
|
||||
}
|
||||
|
||||
// 服务端汇总未读为 0 时,清掉内存中残留的红点
|
||||
if (totalUnread === 0) {
|
||||
const currentConversations = store.getState().conversations;
|
||||
|
||||
Reference in New Issue
Block a user