Bug 467246 - Port |Bug 346553 - Rebuilding mailbox index using File/Properties changes message list view but not current mailbox| to SeaMonkey; (Av1) Trivial synchronization; r+sr=neil a20a2=kairo
authorSerge Gautherie <sgautherie.bz@free.fr>
Mon, 01 Dec 2008 17:25:10 +0100
changeset 1275 af56c60ffc2b1c5279a096ddbb9a12a339128d37
parent 1274 7861821bf3851c355e75fd8a39b002ae270ba15c
child 1276 f9e673155ebbab6a5c69d4262a43b0ba3e5a0f7a
push idunknown
push userunknown
push dateunknown
bugs467246, 346553
Bug 467246 - Port |Bug 346553 - Rebuilding mailbox index using File/Properties changes message list view but not current mailbox| to SeaMonkey; (Av1) Trivial synchronization; r+sr=neil a20a2=kairo
mailnews/base/resources/content/widgetglue.js
--- a/mailnews/base/resources/content/widgetglue.js
+++ b/mailnews/base/resources/content/widgetglue.js
@@ -270,21 +270,25 @@ function RebuildSummaryFile(msgFolder)
   msgDB.summaryValid = false;
   try {
     msgFolder.closeAndBackupFolderDB("");
   }
   catch(e) {
     // In a failure, proceed anyway since we're dealing with problems
     msgFolder.ForceDBClosed();
   }
-
   // these two lines will cause the thread pane to get reloaded
-  // when the download/reparse are finised.
-  gRerootOnFolderLoad = true;
-  gCurrentFolderToReroot = msgFolder.URI;
+  // when the download/reparse is finished. Only do this
+  // if the selected folder is loaded (i.e., not thru the
+  // context menu on a non-loaded folder).
+  if (msgFolder == GetLoadedMsgFolder())
+  {
+    gRerootOnFolderLoad = true;
+    gCurrentFolderToReroot = msgFolder.URI;
+  }
   msgFolder.updateFolder(msgWindow);
 }
 
 function FolderProperties(name, oldName, uri)
 {
   if (name != oldName)
     RenameFolder(name, uri);
 }