Cleanup & Speedup *Collection objects

This commit is contained in:
djmaze 2020-03-19 15:21:00 +01:00
parent f6fdb69c65
commit ebfde6e360
12 changed files with 169 additions and 209 deletions

View file

@ -155,15 +155,14 @@ class Folder
public function HasVisibleSubFolders() : bool
{
$sList = array();
if ($this->oSubFolders)
{
$sList = $this->oSubFolders->FilterList(function (\MailSo\Mail\Folder $oFolder) {
return $oFolder->IsSubscribed();
});
if ($this->oSubFolders) {
foreach ($this->oSubFolders as $oFolder) {
if ($oFolder->IsSubscribed()) {
return true;
}
}
}
return 0 < \count($sList);
return false;
}
public function IsSubscribed() : bool