mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Kolab folders are not selectable
This commit is contained in:
parent
474c2b9f95
commit
44f73828f1
1 changed files with 12 additions and 2 deletions
|
|
@ -171,7 +171,8 @@ class Folder implements \JsonSerializable
|
||||||
|
|
||||||
public function IsSelectable() : bool
|
public function IsSelectable() : bool
|
||||||
{
|
{
|
||||||
return $this->bExists && $this->oImapFolder->IsSelectable();
|
$type = $this->getKolabFolderType();
|
||||||
|
return $this->bExists && $this->oImapFolder->IsSelectable() && (!$type || 0 === \strpos($type, 'mail.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -225,11 +226,15 @@ class Folder implements \JsonSerializable
|
||||||
case \in_array('\\all', $aFlags):
|
case \in_array('\\all', $aFlags):
|
||||||
case \in_array('\\allmail', $aFlags):
|
case \in_array('\\allmail', $aFlags):
|
||||||
return \MailSo\Imap\Enumerations\FolderType::ALL;
|
return \MailSo\Imap\Enumerations\FolderType::ALL;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// case 'Templates' === $this->FullNameRaw():
|
||||||
|
// return \MailSo\Imap\Enumerations\FolderType::TEMPLATES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// TODO: Kolab
|
// TODO: Kolab
|
||||||
switch ($this->oImapFolder->GetMetadata(MetadataKeys::KOLAB_CTYPE) ?: $this->oImapFolder->GetMetadata(MetadataKeys::KOLAB_CTYPE_SHARED)) {
|
switch ($this->getKolabFolderType()) {
|
||||||
{
|
{
|
||||||
case 'event':
|
case 'event':
|
||||||
return \MailSo\Imap\Enumerations\FolderType::CALENDAR;
|
return \MailSo\Imap\Enumerations\FolderType::CALENDAR;
|
||||||
|
|
@ -286,4 +291,9 @@ class Folder implements \JsonSerializable
|
||||||
'Metadata' => $this->oImapFolder->Metadata()
|
'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