(nnimap-update-info): Tell Gnus whether there are any \Recent messages.
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2011 10:20:52 +0000 (02:20 -0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Feb 2011 10:20:52 +0000 (02:20 -0800)
lisp/ChangeLog
lisp/nnimap.el

index 8ba2338..bb01408 100644 (file)
@@ -1,6 +1,7 @@
 2011-02-07  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * nnimap.el (nnimap-update-info): Refactor slightly.
+       (nnimap-update-info): Tell Gnus whether there are any \Recent messages.
 
 2011-02-06  Lars Ingebrigtsen  <larsi@gnus.org>
 
index b1bbf4e..44ee790 100644 (file)
@@ -1316,6 +1316,16 @@ textual parts.")
                    (when new-marks
                      (push (cons (car type) new-marks) marks)))))
              (gnus-info-set-marks info marks t))))
+       ;; Tell Gnus whether there are any \Recent messages in any of
+       ;; the groups.
+       (let ((recent (cdr (assoc '%Recent flags))))
+         (when (and active recent)
+           (while recent
+             (when (> (car recent) (cdr active))
+               (push (list (cons (gnus-group-real-name group) 0))
+                     nnmail-split-history)
+               (setq recent nil))
+             (pop recent))))
        ;; Note the active level for the next run-through.
        (gnus-group-set-parameter info 'active (gnus-active group))
        (gnus-group-set-parameter info 'uidvalidity uidvalidity)