mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Cleanup messages cache handling
This commit is contained in:
parent
745a3603fe
commit
7f8707c4c0
3 changed files with 4 additions and 27 deletions
|
|
@ -270,9 +270,7 @@ export class FolderCollectionModel extends AbstractCollectionModel
|
||||||
FolderUserStore.namespace = this.namespace;
|
FolderUserStore.namespace = this.namespace;
|
||||||
|
|
||||||
// 'THREAD=REFS', 'THREAD=REFERENCES', 'THREAD=ORDEREDSUBJECT'
|
// 'THREAD=REFS', 'THREAD=REFERENCES', 'THREAD=ORDEREDSUBJECT'
|
||||||
AppUserStore.threadsAllowed(!!(
|
AppUserStore.threadsAllowed(!!this.capabilities.some(capa => capa.startsWith('THREAD=')));
|
||||||
Settings.app('useImapThread') && this.capabilities.some(capa => capa.startsWith('THREAD='))
|
|
||||||
));
|
|
||||||
|
|
||||||
// FolderUserStore.folderListOptimized(!!this.optimized);
|
// FolderUserStore.folderListOptimized(!!this.optimized);
|
||||||
FolderUserStore.quotaUsage(this.quotaUsage);
|
FolderUserStore.quotaUsage(this.quotaUsage);
|
||||||
|
|
|
||||||
|
|
@ -729,7 +729,6 @@ class Actions
|
||||||
$aResult['System'], array(
|
$aResult['System'], array(
|
||||||
'allowHtmlEditorBitiButtons' => (bool)$oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
'allowHtmlEditorBitiButtons' => (bool)$oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
|
||||||
'allowCtrlEnterOnCompose' => (bool)$oConfig->Get('labs', 'allow_ctrl_enter_on_compose', 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),
|
'allowAppendMessage' => (bool)$oConfig->Get('labs', 'allow_message_append', false),
|
||||||
'folderSpecLimit' => (int)$oConfig->Get('labs', 'folders_spec_limit', 50),
|
'folderSpecLimit' => (int)$oConfig->Get('labs', 'folders_spec_limit', 50),
|
||||||
'listPermanentFiltered' => '' !== \trim($oConfig->Get('imap', 'message_list_permanent_filter', '')),
|
'listPermanentFiltered' => '' !== \trim($oConfig->Get('imap', 'message_list_permanent_filter', '')),
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,10 @@ trait Messages
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!$this->Config()->Get('imap', 'use_thread', true)) {
|
if ($this->Config()->Get('cache', 'enable', true) && $this->Config()->Get('cache', 'server_uids', false)) {
|
||||||
$oParams->bUseThreads = false;
|
$oParams->oCacher = $this->Cacher($oAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oParams->oCacher = $this->cacherForUids();
|
|
||||||
$oParams->bUseSort = true;
|
$oParams->bUseSort = true;
|
||||||
|
|
||||||
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
|
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
|
||||||
|
|
@ -424,7 +423,7 @@ trait Messages
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$oMessage = $this->MailClient()->Message($sFolder, $iUid, true, $this->cacherForThreads());
|
$oMessage = $this->MailClient()->Message($sFolder, $iUid, true, $this->Cacher($oAccount));
|
||||||
}
|
}
|
||||||
catch (\Throwable $oException)
|
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
|
private function buildReadReceiptMessage(Account $oAccount) : \MailSo\Mime\Message
|
||||||
{
|
{
|
||||||
$sReadReceipt = $this->GetActionParam('ReadReceipt', '');
|
$sReadReceipt = $this->GetActionParam('ReadReceipt', '');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue