- if ((ctx = mx_open_mailbox (tmp->path, M_READONLY | M_QUIET | M_NOSORT, NULL)) != NULL) {
- msg_count = ctx->msgcount;
- msg_new = ctx->new;
- msg_unread = ctx->unread;
+ if ((ctx =
+ mx_open_mailbox (tmp->path, M_READONLY | M_QUIET | M_NOSORT,
+ NULL)) != NULL) {
+ tmp->msgcount = ctx->msgcount;
+ tmp->new = ctx->new;
+ tmp->msg_unread = ctx->new; /* for sidebar, wtf? */
+ tmp->msg_flagged = ctx->flagged;