rem:  if(IsCurrentLoadedFolder(folder)) { msgNavigationService.EnsureDocumentIsLoaded(document); if(gNextMessageAfterDelete) { var nextMessage = document.getElementById(gNextMessageAfterDelete); gNextMessageAfterDelete = null; SelectNextMessage(nextMessage); var threadTree = GetThreadTree(); if(threadTree) threadTree.ensureElementIsVisible(nextMessage); } } } 
add: HandleDeleteOrMoveMsgCompleted(folder); } 
context:     OnItemEvent: function(folder, event) {        if (event.GetUnicode() == "FolderLoaded") {            		if(folder)		{			var resource = folder.QueryInterface(Components.interfaces.nsIRDFResource);			if(resource)			{				var uri = resource.Value;				//dump("In OnFolderLoaded for " + uri +"\n");				if(uri == gCurrentFolderToReroot)				{					gCurrentFolderToReroot="";					var msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);					if(msgFolder)					{						msgFolder.endFolderLoading();						RerootFolder(uri, msgFolder, gCurrentLoadingFolderIsThreaded, gCurrentLoadingFolderSortID, gCurrentLoadingFolderSortDirection);						gCurrentLoadingFolderIsThreaded = false;						gCurrentLoadingFolderSortID = "";						gCurrentLoadingFolderSortDirection = null;					}				}				if(uri == gCurrentLoadingFolderURI)				{				  gCurrentLoadingFolderURI = "";				  //Now let's select the first new message if there is one				  var beforeScrollToNew = new Date();				  msgNavigationService.EnsureDocumentIsLoaded(document);				  ScrollToFirstNewMessage();				  var afterScrollToNew = new Date();				  var timeToScroll = (afterScrollToNew.getTime() - beforeScrollToNew.getTime())/1000;				  var afterFolderLoadTime = new Date();				  var timeToLoad = (afterFolderLoadTime.getTime() - gBeforeFolderLoadTime.getTime())/1000;				  if(showPerformance)				  {					  dump("Time to load " + uri + " is " +  timeToLoad + " seconds\n");				  	  dump("of which scrolling to new is" + timeToScroll + "seconds\n");				  }				}			}		}        } else if (event.GetUnicode() == "DeleteOrMoveMsgCompleted") {            		if(IsCurrentLoadedFolder(folder))		{			msgNavigationService.EnsureDocumentIsLoaded(document);			if(gNextMessageAfterDelete)			{				var nextMessage = document.getElementById(gNextMessageAfterDelete);	       gNextMessageAfterDelete = null;				SelectNextMessage(nextMessage);				var threadTree = GetThreadTree();				if(threadTree)					threadTree.ensureElementIsVisible(nextMessage);			}		}	}    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/04c7fee48ac41078aa2e8c28704300aaa61bbda1/msgMail3PaneWindow.js/clean/mailnews/base/resources/content/msgMail3PaneWindow.js