From: Emanuele Giaquinta Date: Mon, 13 Sep 2010 18:00:34 +0000 (+0100) Subject: Restore the previous behaviour of checking for new messages in imap folders when... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fb919519e5e77f297d92859fdac663500658a10;p=neomutt Restore the previous behaviour of checking for new messages in imap folders when mail_check_recent is set. --- diff --git a/imap/command.c b/imap/command.c index 0959068c5..3330d989c 100644 --- a/imap/command.c +++ b/imap/command.c @@ -992,17 +992,17 @@ static void cmd_parse_status (IMAP_DATA* idata, char* s) if (option(OPTMAILCHECKRECENT)) { - /* - * the \Recent flag will be set on messages that have been delivered since the mailbox - * was last opened. - */ - inc->new = status->recent; + if (olduv && olduv == status->uidvalidity) + { + if (oldun < status->uidnext) + inc->new = status->unseen; + } + else if (!olduv && !oldun) + /* first check per session, use recent. might need a flag for this. */ + inc->new = status->recent; + else + inc->new = status->unseen; } - else if (olduv && olduv == status->uidvalidity) - { - if (oldun < status->uidnext) - inc->new = status->unseen; - } else inc->new = status->unseen;