|
- emptyJunk: function ftc_emptyJunk(aFolder) {
- const Ci = Components.interfaces;
- let folder = aFolder || gFolderTreeView.getSelectedFolders()[0];
- if (!folder || !folder.getFlag(nsMsgFolderFlags.Junk))
- return;
- if (!this._checkConfirmationPrompt("emptyJunk", folder))
- return;
- // Delete any subfolders this folder might have
- let iter = folder.subFolders;
- while (iter.hasMoreElements())
- folder.propagateDelete(iter.getNext(), true, msgWindow);
- // Now delete the messages
- iter = fixIterator(folder.messages);
- let messages = [m for (m in iter)];
- let children = toXPCOMArray(messages, Ci.nsIMutableArray);
- folder.deleteMessages(children, msgWindow, true, false, null, false);
- },
复制代码 |
|