Always update folder count after purge command (#7051)

... not only when it is the current folder.
pull/7066/head
johndoh 5 years ago committed by Aleksander Machniak
parent e0574d909e
commit b68c141e1d

@ -59,6 +59,13 @@ else if ($RCMAIL->action == 'purge') {
if ($success) {
$OUTPUT->show_message('folderpurged', 'confirmation');
$OUTPUT->command('set_unread_count', $mbox, 0);
rcmail_set_unseen_count($mbox, 0);
// set trash folder state
if ($mbox === $trash_mbox) {
$OUTPUT->command('set_trash_count', 0);
}
if (!empty($_REQUEST['_reload'])) {
$OUTPUT->set_env('messagecount', 0);
@ -66,14 +73,7 @@ else if ($RCMAIL->action == 'purge') {
$OUTPUT->set_env('exists', 0);
$OUTPUT->command('message_list.clear');
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text(), $mbox);
$OUTPUT->command('set_unread_count', $mbox, 0);
$OUTPUT->command('set_quota', $RCMAIL->quota_content(null, $mbox));
rcmail_set_unseen_count($mbox, 0);
// set trash folder state
if ($mbox === $trash_mbox) {
$OUTPUT->command('set_trash_count', 0);
}
}
}
else {

Loading…
Cancel
Save