summaryrefslogtreecommitdiff
path: root/program/steps/mail/move_del.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-06-11 13:35:03 +0000
committeralecpl <alec@alec.pl>2009-06-11 13:35:03 +0000
commit011b02e75b6fca2a953971fd1bee3135f283b8cb (patch)
tree01ead19a1374eb298fed389e63010a573cea72a4 /program/steps/mail/move_del.inc
parentcd9a03685669a983167e8f5093e5b56e25923d54 (diff)
- speed up: don't count UNSEEN if mailbox is empty
Diffstat (limited to 'program/steps/mail/move_del.inc')
-rw-r--r--program/steps/mail/move_del.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index 9d7d77957..df7bef981 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -101,7 +101,8 @@ else
// update mailboxlist
$mbox = $IMAP->get_mailbox_name();
- $OUTPUT->command('set_unread_count', $mbox, $IMAP->messagecount($mbox, 'UNSEEN'), ($mbox == 'INBOX'));
+ $unseen_count = $msg_count ? $IMAP->messagecount($mbox, 'UNSEEN') : 0;
+ $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX'));
if ($RCMAIL->action=='moveto' && $target) {
$OUTPUT->command('set_unread_count', $target, $IMAP->messagecount($target, 'UNSEEN'));