summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-26 13:09:56 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-26 13:09:56 +0100
commit993eb88d5aaeccd2d60758dd01f27265230e18b7 (patch)
treef10b6d5a9389d7177c52edce8d488974c4f09f27 /program/steps/mail
parentac3cddac97afb04a079b3f32d689304bb5228ee2 (diff)
Always send unread counter update for current folder
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/getunread.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc
index fb7e802fb..fda6448d4 100644
--- a/program/steps/mail/getunread.inc
+++ b/program/steps/mail/getunread.inc
@@ -35,7 +35,10 @@ if (!empty($a_folders))
else
$unseen = $RCMAIL->storage->count($mbox_row, 'UNSEEN', $unseen_old === null);
- if ($unseen || $unseen_old === null) {
+ // call it always for current folder, so it can update counter
+ // after possible message status change when opening a message
+ // not in preview frame
+ if ($unseen || $unseen_old === null || $mbox_row == $current) {
$OUTPUT->command('set_unread_count', $mbox_row, $unseen, $inbox && $mbox_row == 'INBOX');
}
@@ -44,5 +47,3 @@ if (!empty($a_folders))
}
$OUTPUT->send();
-
-