зеркало из https://github.com/mozilla/gecko-dev.git
Only reroot if the folder notification we receive is for the folder that's currently the loading folder.
This commit is contained in:
Родитель
14af4ec4c1
Коммит
7272cb2fa1
|
@ -197,6 +197,7 @@ function ChangeFolderByURI(uri)
|
|||
{
|
||||
try
|
||||
{
|
||||
gCurrentLoadingFolderURI = uri;
|
||||
msgfolder.StartFolderLoading();
|
||||
msgfolder.UpdateFolder();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ var messageDSProgID = datasourceProgIDPrefix + "mailnewsmessages";
|
|||
|
||||
var gFolderTree;
|
||||
var gThreadTree;
|
||||
var gCurrentLoadingFolderURI
|
||||
|
||||
// get the messenger instance
|
||||
var messenger = Components.classes[messengerProgID].createInstance();
|
||||
|
@ -70,18 +71,13 @@ var folderListener = {
|
|||
if(resource)
|
||||
{
|
||||
var uri = resource.Value;
|
||||
var folderTree = GetFolderTree();
|
||||
var selArray = folderTree.selectedItems;
|
||||
if ( selArray && (selArray.length == 1) )
|
||||
if(uri == gCurrentLoadingFolderURI)
|
||||
{
|
||||
var id = selArray[0].getAttribute('id');
|
||||
if(uri == id)
|
||||
{
|
||||
var msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
if(msgFolder)
|
||||
msgFolder.EndFolderLoading();
|
||||
RerootFolder(uri);
|
||||
}
|
||||
gCurrentLoadingFolderURI="";
|
||||
var msgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
if(msgFolder)
|
||||
msgFolder.EndFolderLoading();
|
||||
RerootFolder(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче