X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=buffy.c;h=126cf8c7f583d53036e30b5d84464de68a3deab8;hb=d429e6df5ef16a8dfd7bcbeb25b0260eb8e5d96f;hp=28f88ace63b39b0e3597dfb581b24a41aa07acf6;hpb=c8ceef3ed6424dcb5a6ec835e7d8d9cc00595372;p=apps%2Fmadmutt.git diff --git a/buffy.c b/buffy.c index 28f88ac..126cf8c 100644 --- a/buffy.c +++ b/buffy.c @@ -463,14 +463,14 @@ int buffy_check (int force) /* only check on force or $imap_mail_check reached */ if (force != 0 || (now - last2 >= ImapBuffyTimeout)) { tmp->msgcount = imap_mailbox_check (tmp->path, 0); - if ((tmp->new = imap_mailbox_check (tmp->path, 1)) > 0) { + tmp->new = imap_mailbox_check (tmp->path, 1); + tmp->msg_unread = imap_mailbox_check (tmp->path, 2); + if (tmp->new > 0) BuffyCount++; - tmp->msg_unread = tmp->new; /* for sidebar; wtf? */ - } - else { + else tmp->new = 0; + if (tmp->msg_unread < 0) tmp->msg_unread = 0; - } } else if (tmp->new > 0) /* keep current stats if !force and !$imap_mail_check reached */