mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 01:17:04 +03:00
Improved Kolab folders visibility
This commit is contained in:
parent
fa6590b3ab
commit
ef9d1ed220
4 changed files with 25 additions and 11 deletions
|
|
@ -171,8 +171,7 @@ class Folder implements \JsonSerializable
|
|||
|
||||
public function IsSelectable() : bool
|
||||
{
|
||||
$type = $this->getKolabFolderType();
|
||||
return $this->bExists && $this->oImapFolder->IsSelectable() && (!$type || 0 === \strpos($type, 'mail.'));
|
||||
return $this->bExists && $this->oImapFolder->IsSelectable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -234,7 +233,8 @@ class Folder implements \JsonSerializable
|
|||
|
||||
/*
|
||||
// TODO: Kolab
|
||||
switch ($this->getKolabFolderType()) {
|
||||
$type = $this->GetMetadata(MetadataKeys::KOLAB_CTYPE) ?: $this->GetMetadata(MetadataKeys::KOLAB_CTYPE_SHARED);
|
||||
switch (($type && 0 !== \strpos($type, 'mail.')) ? $type : null)
|
||||
{
|
||||
case 'event':
|
||||
return \MailSo\Imap\Enumerations\FolderType::CALENDAR;
|
||||
|
|
@ -291,9 +291,4 @@ class Folder implements \JsonSerializable
|
|||
'Metadata' => $this->oImapFolder->Metadata()
|
||||
);
|
||||
}
|
||||
|
||||
protected function getKolabFolderType() : ?string
|
||||
{
|
||||
return $this->GetMetadata(MetadataKeys::KOLAB_CTYPE) ?: $this->GetMetadata(MetadataKeys::KOLAB_CTYPE_SHARED);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue