diff --git a/apps/desktop/src/chat/ChatWidget.tsx b/apps/desktop/src/chat/ChatWidget.tsx index e4ecf0f..dcd4877 100644 --- a/apps/desktop/src/chat/ChatWidget.tsx +++ b/apps/desktop/src/chat/ChatWidget.tsx @@ -107,6 +107,7 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) { const unreadIds = payload.messages.filter(m => !m.isFromMachine).map(m => m.id as string) if (unreadIds.length > 0) { markMachineMessagesRead(ticketId, unreadIds).catch(err => console.error("mark read falhou", err)) + setUnreadCount(0) } }, (err) => { @@ -218,6 +219,7 @@ export function ChatWidget({ ticketId, ticketRef }: ChatWidgetProps) { const handleExpand = async () => { setIsMinimized(false) + setUnreadCount(0) try { await invoke("set_chat_minimized", { ticketId, minimized: false }) } catch (err) {