diff --git a/src/composables/useNotifications.js b/src/composables/useNotifications.js index 41aff7f..40028eb 100644 --- a/src/composables/useNotifications.js +++ b/src/composables/useNotifications.js @@ -115,9 +115,12 @@ export function useNotifications() { ownerId = data.user.id; await store.load(ownerId); - // Seed do set: notifs system_alert já lidas/vistas não redisparam toast + // Seed: marca TODAS as system_alert existentes como "já vistas" pra + // não redisparar toast em F5/reload. Alertas antigos aparecem no + // sino/drawer normalmente; toast só dispara pra alertas que chegarem + // depois do mount (via Realtime ou catch-up detectando ids novos). for (const item of store.items || []) { - if (item.type === 'system_alert' && (item.read_at || item.archived)) { + if (item.type === 'system_alert') { alertedIds.add(item.id); } }