Bug 496543: Marks folders as read only marks first folder. r=bienvenu
authorMagnus Melin <mkmelin@iki.fi>
Thu, 18 Jun 2009 20:41:39 +0300
changeset 2878 ddb48960e0ac2371a21789b3fa1ec043e8109a56
parent 2877 13abe64027e780aa72785a916903477f6729496c
child 2879 7674cfc3f3a47025c0de682f1b622d81ec6f140c
push idunknown
push userunknown
push dateunknown
reviewersbienvenu
bugs496543
Bug 496543: Marks folders as read only marks first folder. r=bienvenu
mail/base/content/mailWindowOverlay.js
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -2166,20 +2166,19 @@ function MsgMarkReadByDate()
 {
   window.openDialog("chrome://messenger/content/markByDate.xul","",
                     "chrome,modal,titlebar,centerscreen",
                     gFolderDisplay.displayedFolder);
 }
 
 function MsgMarkAllRead()
 {
-  var folder = GetSelectedMsgFolders()[0];
-
-  if (folder)
-    folder.markAllMessagesRead(msgWindow);
+  let folders = gFolderTreeView.getSelectedFolders();
+  for (let i = 0; i < folders.length; i++)
+    folders[i].markAllMessagesRead(msgWindow);
 }
 
 function MsgFilters(emailAddress, folder)
 {
   if (!folder)
   {
     // Try to determine the folder from the selected message.
     if (gDBView)