Skip to content
Snippets Groups Projects
Commit 44618f7c authored by Kayz's avatar Kayz Committed by Rob Swindell
Browse files

webv4 header should show count for unread mail instead of all mail (using new...

webv4 header should show count for unread mail instead of all mail (using new user.stats.unread_mail_waiting)
parent 1c2d9c5e
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -6,7 +6,7 @@ function cycle() {
if (user.number < 1 || user.alias == settings.guest) return;
if (time() - last_run <= frequency) return;
last_run = time();
const count = user.stats.mail_waiting;
const count = user.stats.unread_mail_waiting;
if (count > 0 || (count == 0 && last_count > 0)) {
emit({ event: 'mail', data: JSON.stringify({ count: count })});
}
......
......@@ -24,6 +24,7 @@ label_message_date = on
label_message_subject = Subject
label_tab_inbox = Inbox
label_tab_sent = Sent
label_new_message = New
[page_register]
title = Register
......
......@@ -18,6 +18,7 @@
<div class="checkbox">
<label class="checkbox-inline">
<input id="check-<? write(header.number); ?>" type="checkbox" class="mail-select">
<? write(header.attr&MSG_READ ? '' : '<span class="badge new">' + locale.strings.page_mail.label_new_message + '</span>') ?>
</label>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment