minor cleanup to make onloadmessenger easier to read

This commit is contained in:
alecf%netscape.com 1999-09-15 04:57:24 +00:00
parent 46f7140270
commit 62bfb8199c

View File

@ -64,13 +64,7 @@ function OnLoadMessenger()
loadStartFolder();
var mailSession = Components.classes['component://netscape/messenger/services/session'].getService();
if(mailSession)
{
mailSession = mailSession.QueryInterface(Components.interfaces.nsIMsgMailSession);
if(mailSession)
mailSession.AddFolderListener(folderListener);
}
getFolderListener();
}
function OnUnloadMessenger()
@ -155,6 +149,18 @@ function loadStartFolder()
}
function getFolderListener()
{
try {
var mailSession = Components.classes['component://netscape/messenger/services/session'].getService(Components.interfaces.nsIMsgMailSession);
mailSession.AddFolderListener(folderListener);
} catch (ex) {
dump("Error adding folder listener\n");
}
}
function AddDataSources()
{