fix(desktop): fechar hub sem sessoes
All checks were successful
CI/CD Web + Desktop / Detect changes (push) Successful in 7s
CI/CD Web + Desktop / Deploy (VPS Linux) (push) Successful in 4m18s
CI/CD Web + Desktop / Deploy Convex functions (push) Has been skipped
Quality Checks / Lint, Test and Build (push) Successful in 4m45s

This commit is contained in:
rever-tecnologia 2025-12-19 13:06:24 -03:00
parent 394fa9e2a3
commit 43017e6fef

View file

@ -947,6 +947,12 @@ async fn process_chat_update(
}),
);
if current_sessions.is_empty() {
close_all_chat_windows(app);
let _ = close_hub_window(app);
return;
}
// Notificar novas mensagens - mostrar chat minimizado com badge
if new_messages && total_unread > 0 {
let new_count = if total_unread > prev_unread {