Ignore:
Timestamp:
Jun 11, 2009 9:35:03 AM (4 years ago)
Author:
alec
Message:
  • speed up: don't count UNSEEN if mailbox is empty
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/mark.inc

    r2635 r2636  
    9292      // update mailboxlist 
    9393      $mbox = $IMAP->get_mailbox_name(); 
    94       $OUTPUT->command('set_unread_count', $mbox, $IMAP->messagecount($mbox, 'UNSEEN'), ($mbox == 'INBOX')); 
    95  
    96 //      $OUTPUT->command('set_quota', rcmail_quota_content($IMAP->get_quota())); 
     94      $unseen_count = $msg_count ? $IMAP->messagecount($mbox, 'UNSEEN') : 0; 
     95      $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX')); 
    9796      $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 
    9897 
Note: See TracChangeset for help on using the changeset viewer.