diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-17 12:07:58 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-17 12:07:58 +0000 |
| commit | d7f648b11a0a0d93ddbd6fa37ce0c33d17976a19 (patch) | |
| tree | 293604c99c3f3286261c66d2a6be0d261f0696d7 /roundcubemail/program/steps/mail/list.inc | |
| parent | ce926d3180f347976d5387c73c301c2b94180620 (diff) | |
- Fix incorrect count of new messages in folder list when using multiple IMAP clients (#1485995)
- Fix all folders checking for new messages with disabled caching (#1486128)
git-svn-id: https://svn.roundcube.net/trunk@2959 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/list.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/list.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/list.inc b/roundcubemail/program/steps/mail/list.inc index 8ba0dd017..a40fce679 100644 --- a/roundcubemail/program/steps/mail/list.inc +++ b/roundcubemail/program/steps/mail/list.inc @@ -60,7 +60,14 @@ if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL') if ($count = $IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh']))) $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order); +// count UNSEEN messages... +$old_unseen = $_SESSION['unseen_count'][$mbox_name]; $unseen = $count ? $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh'])) : 0; +$_SESSION['unseen_count'][$mbox_name] = $unseen; + +// ...and update mailboxlist +if ($unseen != $old_unseen) + $OUTPUT->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX')); // update message count display $pages = ceil($count/$IMAP->page_size); @@ -80,9 +87,6 @@ else if ($search_request) $OUTPUT->show_message('searchnomatch', 'notice'); else $OUTPUT->show_message('nomessagesfound', 'notice'); - -// update mailboxlist -$OUTPUT->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX')); // send response $OUTPUT->send(); |
