Skip to content

Commit

Permalink
https://github.com/the-djmaze/snappymail/issues/724#issuecomment-1369…
Browse files Browse the repository at this point in the history
…826672
  • Loading branch information
the-djmaze committed Jan 3, 2023
1 parent 19c0c5c commit 56c681b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions snappymail/v/0.0.0/app/libraries/MailSo/Mail/MailClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ public function MessageList(MessageListParams $oParams) : MessageCollection
$oMessageCollection->FolderInfo = $oInfo;
$oMessageCollection->totalEmails = $oInfo->MESSAGES;

$bUseThreads = $oParams->bUseThreads
&& ($this->oImapClient->hasCapability('THREAD=REFS') || $this->oImapClient->hasCapability('THREAD=REFERENCES') || $this->oImapClient->hasCapability('THREAD=ORDEREDSUBJECT'));
$bUseThreads = $oParams->bUseThreads && $this->oImapClient->CapabilityValue('THREAD');
// && ($this->oImapClient->hasCapability('THREAD=REFS') || $this->oImapClient->hasCapability('THREAD=REFERENCES') || $this->oImapClient->hasCapability('THREAD=ORDEREDSUBJECT'));
if ($oParams->iThreadUid && !$bUseThreads) {
throw new \InvalidArgumentException('THREAD not supported');
}
Expand All @@ -686,6 +686,8 @@ public function MessageList(MessageListParams $oParams) : MessageCollection

$message_list_limit = $this->oImapClient->Settings->message_list_limit;
if (0 < $message_list_limit && $message_list_limit < $oInfo->MESSAGES) {
// if ((0 < $message_list_limit && $message_list_limit < $oInfo->MESSAGES)
// || (!$this->oImapClient->hasCapability('SORT') && !$this->oImapClient->CapabilityValue('THREAD'))) {
// Don't use THREAD for speed
$oMessageCollection->Limited = true;
if ($this->oLogger) {
Expand Down

0 comments on commit 56c681b

Please sign in to comment.