diff --git a/web/src/features/system/SystemMessagesView.tsx b/web/src/features/system/SystemMessagesView.tsx index 2aa83d49..24036280 100644 --- a/web/src/features/system/SystemMessagesView.tsx +++ b/web/src/features/system/SystemMessagesView.tsx @@ -194,8 +194,30 @@ export function SystemMessagesView() { const { icon, className } = iconForEvent(item.event_type); const action = actionRoute(item); const isUnread = !item.read_at; + // The whole card is the click target, not just the "查看…" link below -- most + // notifications (好友申请已通过/拒绝, most 群聊动态) have no `actionRoute` at all, so + // gating mark-read on that inner link left them with literally nothing clickable + // anywhere on the card, permanently stuck showing "新" no matter how long they sat there + // (a real, reported bug: "有些消息没有链接,没地方点击就一直是新"). A card with an action + // still marks read AND navigates; one without just marks read, since there's nowhere to go. + const activate = () => { + if (isUnread) readMutation.mutate(item.id); + if (action) navigate(action.to); + }; return ( -
{notificationText(item)}
- {action ? ( - - ) : null} + {/* Plain text, not a nested `