diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/getunread.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc index bee2073e3..431ba8a90 100644 --- a/program/steps/mail/getunread.inc +++ b/program/steps/mail/getunread.inc @@ -26,11 +26,11 @@ if (!empty($a_folders)) $inbox = ($IMAP->get_mailbox_name() == 'INBOX'); foreach ($a_folders as $mbox_row) { $unseen = $IMAP->messagecount($mbox_row, 'UNSEEN', !isset($_SESSION['unseen_count'][$mbox_row])); - $_SESSION['unseen_count'][$mbox_row] = $unseen; - if ($unseen) { + if ($unseen || !isset($_SESSION['unseen_count'][$mbox_row])) { $OUTPUT->command('set_unread_count', $mbox_row, $unseen, $inbox && $mbox_row == 'INBOX'); } + $_SESSION['unseen_count'][$mbox_row] = $unseen; } } |