From e70b3b24fc8ac7b54a820ae87ce8f4af4043125e Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 9 Oct 2008 06:25:43 +0000 Subject: [PATCH] - send set_unread_count() only when changing /Seen status --- program/steps/mail/mark.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index ce4249d54..c45131d26 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -40,12 +40,13 @@ if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_va $OUTPUT->command('flag_deleted_as_read', $uids); } - if ($marked != -1) + if ($marked != -1 && ($flag == 'SEEN' || $flag == 'UNSEEN')) { $mbox_name = $IMAP->get_mailbox_name(); $OUTPUT->command('set_unread_count', $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'), ($mbox_name == 'INBOX')); - $OUTPUT->send(); } + + $OUTPUT->send(); } exit;