зеркало из https://github.com/mozilla/pjs.git
Port Neil's fix for Bug #165610
Optimize PerformExpandForAllOpenServers
This commit is contained in:
Родитель
f8fc2ba2c6
Коммит
5a7cfe234f
|
@ -34,6 +34,9 @@ const kStandardPaneConfig = 0;
|
|||
const kWidePaneConfig = 1;
|
||||
const kVerticalPaneConfig = 2;
|
||||
|
||||
// from nsMsgFolderFlags.h
|
||||
const MSG_FOLDER_FLAG_ELIDED = 0x10;
|
||||
|
||||
var gFolderTree;
|
||||
var gMessagePane;
|
||||
var gThreadTree;
|
||||
|
@ -794,26 +797,12 @@ function NotifyObservers(aSubject, aTopic, aData)
|
|||
// PerformExpand() for all servers that are open at startup.
|
||||
function PerformExpandForAllOpenServers()
|
||||
{
|
||||
var folderTree = GetFolderTree();
|
||||
var view = folderTree.treeBoxObject.view;
|
||||
for (var i = 0; i < view.rowCount; i++)
|
||||
var servers = accountManager.allServers;
|
||||
for (var i = 0; i < servers.Count(); i++)
|
||||
{
|
||||
if (view.isContainer(i))
|
||||
{
|
||||
var folderResource = GetFolderResource(folderTree, i);
|
||||
var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
var isServer = GetFolderAttribute(folderTree, folderResource, "IsServer");
|
||||
if (isServer == "true")
|
||||
{
|
||||
if (view.isContainerOpen(i))
|
||||
{
|
||||
var server = msgFolder.server;
|
||||
// Don't do this for imap servers. See bug #41943
|
||||
if (server.type != "imap")
|
||||
server.performExpand(msgWindow);
|
||||
}
|
||||
}
|
||||
}
|
||||
var server = servers.QueryElementAt(i, Components.interfaces.nsIMsgIncomingServer);
|
||||
if (server.type != "imap" && !server.rootMsgFolder.getFlag(MSG_FOLDER_FLAG_ELIDED))
|
||||
server.performExpand(msgWindow);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче