Commit 44618f7c authored by Michael Long's avatar Michael Long Committed by Rob Swindell

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
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment