summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-05-03 18:27:38 +0000
committeralecpl <alec@alec.pl>2010-05-03 18:27:38 +0000
commitc6427797b7b54716a8555fa5acef817a7ea3cdfc (patch)
tree6f8f0a4eadde5418cc476c4115ff68f2620225a6 /program/steps/mail
parent9675784c6e6c805db379fd9c81f5f3bcffdbcc85 (diff)
- fix unseen messages counter after unseen message preview
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/show.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 10de46a36..82af4780f 100644
--- a/program/steps/mail/show.inc
+++ b/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;