summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/list.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-04 07:18:26 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-04 07:18:26 +0000
commit5b4aa9fdd7ea0eb70fad25714278613a91cf6b34 (patch)
treed5d6a7aefe660bf38106cf0567613ebdf22ecdf1 /roundcubemail/program/steps/mail/list.inc
parent1da31d8556f8aadc230e7a419fa6df1100cf281e (diff)
- Skip UNSEEN counting when list is empty
git-svn-id: https://svn.roundcube.net/trunk@3710 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/list.inc')
-rw-r--r--roundcubemail/program/steps/mail/list.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/mail/list.inc b/roundcubemail/program/steps/mail/list.inc
index 85e71a1f7..cf3855169 100644
--- a/roundcubemail/program/steps/mail/list.inc
+++ b/roundcubemail/program/steps/mail/list.inc
@@ -70,8 +70,13 @@ if ($count = $IMAP->messagecount($mbox_name, $IMAP->threading ? 'THREADS' : 'ALL
if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))
$_SESSION['search'][$_REQUEST['_search']] = $IMAP->get_search_set();
+// empty result? we'll skip UNSEEN counting in rcmail_send_unread_count()
+if (empty($search_request) && empty($a_headers)) {
+ $unseen = 0;
+}
+
// update mailboxlist
-rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']));
+rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen);
// update message count display
$pages = ceil($count/$IMAP->page_size);