- (setq answereds
- (nconc
- answereds
- (mapcar (lambda (x)
- (+ x (* cur-number
- (elmo-multi-folder-divide-number-internal
- folder))))
- (elmo-folder-list-answereds child)))))
- answereds))
-
-(luna-define-method elmo-folder-list-importants ((folder elmo-multi-folder))
- (let ((cur-number 0)
- importants)
- (dolist (child (elmo-multi-folder-children-internal folder))
+ (unless (listp (setq unreads
+ (elmo-folder-list-unreads-internal
+ (car folders) unread-marks (car mark-alists))))
+ (setq unreads (delq nil
+ (mapcar
+ (lambda (x)
+ (if (member (cadr x) unread-marks)
+ (car x)))
+ (car mark-alists)))))
+ (setq all-unreads
+ (nconc all-unreads
+ (mapcar
+ (lambda (x)
+ (+ x
+ (* cur-number
+ (elmo-multi-folder-divide-number-internal
+ folder))))
+ unreads)))
+ (setq mark-alists (cdr mark-alists)
+ folders (cdr folders)))
+ all-unreads))
+
+(luna-define-method elmo-folder-list-importants-internal
+ ((folder elmo-multi-folder) important-mark)
+ (let ((folders (elmo-multi-folder-children-internal folder))
+ (mark-alists (elmo-multi-split-mark-alist
+ folder
+ (elmo-msgdb-get-mark-alist
+ (elmo-folder-msgdb folder))))
+ (cur-number 0)
+ importants
+ all-importants)
+ (while folders