From 5db16c76d7f0593f2799df04a9f6556e05f8c363 Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 3 May 2010 18:27:38 +0000 Subject: - fix unseen messages counter after unseen message preview git-svn-id: https://svn.roundcube.net/trunk@3589 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/show.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/steps/mail/show.inc b/roundcubemail/program/steps/mail/show.inc index 10de46a36..82af4780f 100644 --- a/roundcubemail/program/steps/mail/show.inc +++ b/roundcubemail/program/steps/mail/show.inc @@ -226,8 +226,12 @@ else // mark message as read -if ($MESSAGE && $MESSAGE->headers && !$MESSAGE->headers->seen && ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($CONFIG['preview_pane_mark_read']) == 0))) - $IMAP->set_flag($MESSAGE->uid, 'SEEN'); +if ($MESSAGE && $MESSAGE->headers && !$MESSAGE->headers->seen && + ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($CONFIG['preview_pane_mark_read']) == 0))) +{ + if ($IMAP->set_flag($MESSAGE->uid, 'SEEN') && $_SESSION['unseen_count'][$mbox_name]) + $_SESSION['unseen_count'][$mbox_name] -= 1; +} exit; -- cgit v1.2.3