IMAP: use elmo-imap4-list in elmo-imap4-folder-list-flagged.
authorvitaly <vitaly>
Tue, 26 May 2009 15:00:41 +0000 (15:00 +0000)
committervitaly <vitaly>
Tue, 26 May 2009 15:00:41 +0000 (15:00 +0000)
elmo-imap4-folder-list-flagged duplicates functionality of elmo-imap4-list.
Besides, elmo-imap4-list can use ESEARCH. Switch it to elmo-imap4-list.

elmo/elmo-imap4.el

index cce89ad..92bec96 100644 (file)
@@ -857,16 +857,7 @@ FLAG is one of the `unread', `read', `important', `answered', `any'."
   (let ((session (elmo-imap4-get-session folder))
        (criteria (elmo-imap4-flag-to-imap-criteria flag)))
     (if (elmo-imap4-session-flag-available-p session flag)
-       (progn
-         (elmo-imap4-session-select-mailbox
-          session
-          (elmo-imap4-folder-mailbox-internal folder))
-         (elmo-imap4-response-value
-          (elmo-imap4-send-command-wait
-           session
-           (format (if elmo-imap4-use-uid "uid search %s"
-                     "search %s") criteria))
-          'search))
+       (elmo-imap4-list folder criteria)
       ;; List flagged messages in the msgdb.
       (elmo-msgdb-list-flagged (elmo-folder-msgdb folder) flag))))