1
0
mirror of https://github.com/moparisthebest/mail synced 2025-01-10 21:18:02 -05:00

[WO-429] Set account.online after setting imap cache to prevent race condition

This commit is contained in:
Tankred Hase 2014-06-23 10:59:17 +02:00
parent af0ae907c9
commit 9465ce57ed

View File

@ -965,9 +965,6 @@ define(function(require) {
return;
}
// set status to online
self._account.online = true;
// init folders
self._initFolders(function(err) {
if (err) {
@ -1009,6 +1006,9 @@ define(function(require) {
});
self._imapClient.mailboxCache = mailboxCache;
// set status to online after setting cache to prevent race condition
self._account.online = true;
// set up the imap client to listen for changes in the inbox
var inbox = _.findWhere(self._account.folders, {
type: 'Inbox'