diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index 563d8ac8e99..6eb5b889b02 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -758,14 +758,22 @@ function MsgGetMessagesForAllServers(defaultServer) var protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + currentServer.type].getService(Components.interfaces.nsIMsgProtocolInfo); if (protocolinfo.canLoginAtStartUp && currentServer.loginAtStartUp) { - if (currentServer.type == "pop3" && currentServer.downloadOnBiff) - { - CoalesceGetMsgsForPop3ServersByDestFolder(currentServer, pop3DownloadServersArray, localFoldersToDownloadTo); - pop3Server = currentServer.QueryInterface(Components.interfaces.nsIPop3IncomingServer); - } - else - // Check to see if there are new messages on the server - currentServer.PerformBiff(msgWindow); + if (defaultServer && defaultServer.equals(currentServer) && + !defaultServer.isDeferredTo && + defaultServer.rootFolder == defaultServer.rootMsgFolder) + { + dump(currentServer.serverURI + "...skipping, already opened\n"); + } + else if (currentServer.type == "pop3" && currentServer.downloadOnBiff) + { + CoalesceGetMsgsForPop3ServersByDestFolder(currentServer, pop3DownloadServersArray, localFoldersToDownloadTo); + pop3Server = currentServer.QueryInterface(Components.interfaces.nsIPop3IncomingServer); + } + else + { + // Check to see if there are new messages on the server + currentServer.PerformBiff(msgWindow); + } } } for (var i = 0; i < pop3DownloadServersArray.length; i++) diff --git a/mail/base/content/msgMail3PaneWindow.js b/mail/base/content/msgMail3PaneWindow.js index 405d2c92de8..66be539a8d0 100644 --- a/mail/base/content/msgMail3PaneWindow.js +++ b/mail/base/content/msgMail3PaneWindow.js @@ -942,7 +942,7 @@ function loadStartFolder(initialUri) // or the case where initialUri is non-null (non-startup) if (!initialUri && isLoginAtStartUpEnabled && gLoadStartFolder && !defaultServer.isDeferredTo && - defaultServer.msgFolder == defaultServer.rootMsgFolder) + defaultServer.rootFolder == defaultServer.rootMsgFolder) defaultServer.PerformBiff(msgWindow); SelectFolder(startFolder.URI);