mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
minor cleanup to make onloadmessenger easier to read
This commit is contained in:
parent
46f7140270
commit
62bfb8199c
@ -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()
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user