From 06895c3e947e1b15da3bb2f6f425962949edb9d9 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 18 May 2007 08:35:28 -0400
Subject: [PATCH] Better refresh of message list; improved HTML mail display

---
 program/steps/mail/list.inc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index a246254..6c72706 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -37,12 +37,13 @@
   $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order'];
 }
 
+$mbox_name = $IMAP->get_mailbox_name();
 
 // fetch message headers
-if ($count = $IMAP->messagecount())
+if ($count = $IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh'])))
   $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order);
 
-$unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh']) ? TRUE : FALSE);
+$unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh']));
 
 // update message count display
 $pages = ceil($count/$IMAP->page_size);
@@ -51,7 +52,7 @@
 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count));
 
 // update mailboxlist
-$OUTPUT->command('set_unread_count', $IMAP->get_mailbox_name(), $unseen);
+$OUTPUT->command('set_unread_count', $mbox_name, $unseen);
 
 
 // add message rows

--
Gitblit v1.9.1