Get folders status asynchronously as it is an expensive operation to be called in initial load

This commit is contained in:
Hadi Nategh 2015-10-06 10:51:35 +00:00
parent 658dcb121e
commit fe9dcbcc12
2 changed files with 5 additions and 2 deletions

View File

@ -240,7 +240,7 @@ class mail_tree
}
//List of folders
$foldersList = $this->ui->mail_bo->getFolderArrays(null, true, $_allInOneGo?0:2,$_subscribedOnly, true);
$foldersList = $this->ui->mail_bo->getFolderArrays(null, true, $_allInOneGo?0:2,$_subscribedOnly, false);
foreach ($foldersList as &$folder)
{
$path = $parent = $parts = explode($folder['delimiter'], $folder['MAILBOX']);

View File

@ -169,7 +169,10 @@ app.classes.mail = AppJS.extend(
var nm = this.et2.getWidgetById(this.nm_index);
this.mail_isMainWindow = true;
this.mail_disablePreviewArea(true);
//Get initial folder status
this.mail_refreshFolderStatus(undefined,undefined,false);
// Bind to nextmatch refresh to update folder status
if(nm != null && (typeof jQuery._data(nm).events=='undefined'||typeof jQuery._data(nm).events.refresh == 'undefined'))
{