Only reroot if the folder notification we receive is for the folder that's currently the loading folder.

This commit is contained in:
putterman%netscape.com 1999-09-21 21:04:52 +00:00
Родитель 14af4ec4c1
Коммит 7272cb2fa1
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -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);
}
}
}