diff --git a/app/templates/base.html b/app/templates/base.html index 5ed8e1d..1e1e413 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -262,6 +262,20 @@ + + + {% block extra_scripts %}{% endblock %} diff --git a/app/templates/index.html b/app/templates/index.html index fbd6ebd..4618a13 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -196,6 +196,12 @@ // Update DM badges when modal is closed (without full page reload) dmModal.addEventListener('hidden.bs.modal', async function () { try { + // Reload DM read status from server to sync with app.js automatic updates + // This ensures dmLastSeenTimestamps in app.js is current + if (typeof loadDmLastSeenTimestampsFromServer === 'function') { + await loadDmLastSeenTimestampsFromServer(); + } + // Fetch latest DM conversations with unread counts const response = await fetch('/api/dm/conversations'); if (response.ok) {