mirror of
https://github.com/moparisthebest/mail
synced 2025-02-12 05:00:19 -05:00
Fix show messages on initial login/folder-sync
This commit is contained in:
parent
6ca1ae6507
commit
f0f0aa3d63
@ -66,9 +66,21 @@ define(function(require) {
|
|||||||
// init folders
|
// init folders
|
||||||
initFolders();
|
initFolders();
|
||||||
// select inbox as the current folder on init
|
// select inbox as the current folder on init
|
||||||
$scope.openFolder($scope.account.folders[0]);
|
if ($scope.account.folders && $scope.account.folders.length > 0) {
|
||||||
|
$scope.openFolder($scope.account.folders[0]);
|
||||||
|
}
|
||||||
// connect imap/smtp clients on first startup
|
// connect imap/smtp clients on first startup
|
||||||
appController.onConnect($scope.onError);
|
appController.onConnect(function(err) {
|
||||||
|
if (err) {
|
||||||
|
$scope.onError(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// select inbox if not yet selected
|
||||||
|
if (!$scope.state.nav.currentFolder) {
|
||||||
|
$scope.openFolder($scope.account.folders[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// helper functions
|
// helper functions
|
||||||
|
@ -73,23 +73,7 @@ define(function(require) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if empty (first time login) use dummy folders ... overwritten in onConnect
|
self._account.folders = folders;
|
||||||
self._account.folders = (folders) ? folders : [{
|
|
||||||
type: 'Inbox',
|
|
||||||
path: 'INBOX'
|
|
||||||
}, {
|
|
||||||
type: 'Sent',
|
|
||||||
path: 'SENT'
|
|
||||||
}, {
|
|
||||||
type: 'Outbox',
|
|
||||||
path: 'OUTBOX'
|
|
||||||
}, {
|
|
||||||
type: 'Drafts',
|
|
||||||
path: 'DRAFTS'
|
|
||||||
}, {
|
|
||||||
type: 'Trash',
|
|
||||||
path: 'TRASH'
|
|
||||||
}];
|
|
||||||
|
|
||||||
callback(null, keypair);
|
callback(null, keypair);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user