]> granicus.if.org Git - neomutt/commitdiff
Restore the previous behaviour of checking for new messages in imap folders when...
authorEmanuele Giaquinta <e.giaquinta@glauco.it>
Mon, 13 Sep 2010 18:00:34 +0000 (19:00 +0100)
committerEmanuele Giaquinta <e.giaquinta@glauco.it>
Mon, 13 Sep 2010 18:00:34 +0000 (19:00 +0100)
imap/command.c

index 0959068c5d339476870f92b20d6bafdda9eff4d8..3330d989c52bfe540fc61fdad420f6ca8e08e36d 100644 (file)
@@ -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;