mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Cleanup messages cache handling
This commit is contained in:
parent
745a3603fe
commit
7f8707c4c0
|
@ -270,9 +270,7 @@ export class FolderCollectionModel extends AbstractCollectionModel
|
|||
FolderUserStore.namespace = this.namespace;
|
||||
|
||||
// 'THREAD=REFS', 'THREAD=REFERENCES', 'THREAD=ORDEREDSUBJECT'
|
||||
AppUserStore.threadsAllowed(!!(
|
||||
Settings.app('useImapThread') && this.capabilities.some(capa => capa.startsWith('THREAD='))
|
||||
));
|
||||
AppUserStore.threadsAllowed(!!this.capabilities.some(capa => capa.startsWith('THREAD=')));
|
||||
|
||||
// FolderUserStore.folderListOptimized(!!this.optimized);
|
||||
FolderUserStore.quotaUsage(this.quotaUsage);
|
||||
|
|
|
@ -729,7 +729,6 @@ class Actions
|
|||
$aResult['System'], array(
|
||||
'allowHtmlEditorBitiButtons' => (bool)$oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
||||
'allowCtrlEnterOnCompose' => (bool)$oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
|
||||
'useImapThread' => (bool)$oConfig->Get('imap', 'use_thread', true),
|
||||
'allowAppendMessage' => (bool)$oConfig->Get('labs', 'allow_message_append', false),
|
||||
'folderSpecLimit' => (int)$oConfig->Get('labs', 'folders_spec_limit', 50),
|
||||
'listPermanentFiltered' => '' !== \trim($oConfig->Get('imap', 'message_list_permanent_filter', '')),
|
||||
|
|
|
@ -73,11 +73,10 @@ trait Messages
|
|||
|
||||
try
|
||||
{
|
||||
if (!$this->Config()->Get('imap', 'use_thread', true)) {
|
||||
$oParams->bUseThreads = false;
|
||||
if ($this->Config()->Get('cache', 'enable', true) && $this->Config()->Get('cache', 'server_uids', false)) {
|
||||
$oParams->oCacher = $this->Cacher($oAccount);
|
||||
}
|
||||
|
||||
$oParams->oCacher = $this->cacherForUids();
|
||||
$oParams->bUseSort = true;
|
||||
|
||||
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
|
||||
|
@ -424,7 +423,7 @@ trait Messages
|
|||
|
||||
try
|
||||
{
|
||||
$oMessage = $this->MailClient()->Message($sFolder, $iUid, true, $this->cacherForThreads());
|
||||
$oMessage = $this->MailClient()->Message($sFolder, $iUid, true, $this->Cacher($oAccount));
|
||||
}
|
||||
catch (\Throwable $oException)
|
||||
{
|
||||
|
@ -901,25 +900,6 @@ trait Messages
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MailSo\Cache\CacheClient|null
|
||||
*/
|
||||
private function cacherForUids()
|
||||
{
|
||||
$oAccount = $this->getAccountFromToken(false);
|
||||
return ($this->Config()->Get('cache', 'enable', true) &&
|
||||
$this->Config()->Get('cache', 'server_uids', false)) ? $this->Cacher($oAccount) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MailSo\Cache\CacheClient|null
|
||||
*/
|
||||
private function cacherForThreads()
|
||||
{
|
||||
$oAccount = $this->getAccountFromToken(false);
|
||||
return !!$this->Config()->Get('imap', 'use_thread', true) ? $this->Cacher($oAccount) : null;
|
||||
}
|
||||
|
||||
private function buildReadReceiptMessage(Account $oAccount) : \MailSo\Mime\Message
|
||||
{
|
||||
$sReadReceipt = $this->GetActionParam('ReadReceipt', '');
|
||||
|
|
Loading…
Reference in a new issue