From cbeea3d4d092f6ae2310175a57fe15b43d608b33 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 17 Sep 2009 08:36:32 -0400
Subject: [PATCH] - some code improvements for r2959 change

---
 program/steps/mail/list.inc |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index a40fce6..57bb919 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -60,14 +60,8 @@
 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 mailboxlist
+rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']));
 
 // update message count display
 $pages = ceil($count/$IMAP->page_size);

--
Gitblit v1.9.1