Forward if METADATA is supported to JavaScript

This commit is contained in:
djmaze 2021-10-15 12:34:45 +02:00
parent 3da130d061
commit c039e813a6
5 changed files with 14 additions and 3 deletions

View file

@ -27,6 +27,11 @@ class FolderCollection extends \MailSo\Base\Collection
*/
public $FoldersHash = '';
/**
* @var bool
*/
public $IsMetadataSupported = false;
/**
* @var bool
*/
@ -153,6 +158,7 @@ class FolderCollection extends \MailSo\Base\Collection
return \array_merge(parent::jsonSerialize(), array(
'Namespace' => $this->GetNamespace(),
'FoldersHash' => $this->FoldersHash ?: '',
'IsMetadataSupported' => $this->IsMetadataSupported,
'IsThreadsSupported' => $this->IsThreadsSupported,
'IsSortSupported' => $this->IsSortSupported,
'Optimized' => $this->Optimized,

View file

@ -1995,6 +1995,7 @@ class MailClient
}
$oFolderCollection = new FolderCollection;
$oFolderCollection->IsMetadataSupported = $this->oImapClient->IsSupported('METADATA');
$oFolderCollection->IsThreadsSupported = $this->IsThreadsSupported();
$oFolderCollection->IsSortSupported = $this->oImapClient->IsSupported('SORT');
$oFolderCollection->Optimized = $iCount !== \count($aMailFoldersHelper);