alecpl
2009-06-11 011b02e75b6fca2a953971fd1bee3135f283b8cb
- speed up: don't count UNSEEN if mailbox is empty


2 files modified
8 ■■■■ changed files
program/steps/mail/mark.inc 5 ●●●●● patch | view | raw | blame | history
program/steps/mail/move_del.inc 3 ●●●● patch | view | raw | blame | history
program/steps/mail/mark.inc
@@ -91,9 +91,8 @@
      // update mailboxlist
      $mbox = $IMAP->get_mailbox_name();
      $OUTPUT->command('set_unread_count', $mbox, $IMAP->messagecount($mbox, 'UNSEEN'), ($mbox == 'INBOX'));
//      $OUTPUT->command('set_quota', rcmail_quota_content($IMAP->get_quota()));
      $unseen_count = $msg_count ? $IMAP->messagecount($mbox, 'UNSEEN') : 0;
      $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX'));
      $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count));
      // add new rows from next page (if any)
program/steps/mail/move_del.inc
@@ -101,7 +101,8 @@
  // 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'));