mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 00:17:03 +03:00
Fix caching for unread/flagged status
This commit is contained in:
parent
81e25b4235
commit
a19e19d866
78 changed files with 519 additions and 514 deletions
|
|
@ -223,7 +223,7 @@ WebMailAjaxRemoteStorage.prototype.messageList = function (fCallback, sFolderFul
|
||||||
iLimit = Utils.isUnd(iOffset) ? 20 : Utils.pInt(iLimit);
|
iLimit = Utils.isUnd(iOffset) ? 20 : Utils.pInt(iLimit);
|
||||||
sSearch = Utils.pString(sSearch);
|
sSearch = Utils.pString(sSearch);
|
||||||
|
|
||||||
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('has:')))
|
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('is:')))
|
||||||
{
|
{
|
||||||
this.defaultRequest(fCallback, 'MessageList', {},
|
this.defaultRequest(fCallback, 'MessageList', {},
|
||||||
'' === sSearch ? Consts.Defaults.DefaultAjaxTimeout : Consts.Defaults.SearchAjaxTimeout,
|
'' === sSearch ? Consts.Defaults.DefaultAjaxTimeout : Consts.Defaults.SearchAjaxTimeout,
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 24px;
|
font-size: 22px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.current .e-page-number {
|
&.current .e-page-number {
|
||||||
font-size: 28px;
|
font-size: 25px;
|
||||||
color: #333;
|
color: #333;
|
||||||
border-bottom: 2px solid #000;
|
border-bottom: 2px solid #000;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1085,8 +1085,9 @@ class MailClient
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getImapSearchCriterias($sSearch, $iTimeZoneOffset = 0, $bAddNotDeleted = false)
|
private function getImapSearchCriterias($sSearch, $iTimeZoneOffset = 0, $bAddNotDeleted = false, &$bUseCache = true)
|
||||||
{
|
{
|
||||||
|
$bUseCache = true;
|
||||||
$aCriteriasResult = array();
|
$aCriteriasResult = array();
|
||||||
if (0 < \strlen(\trim($sSearch)))
|
if (0 < \strlen(\trim($sSearch)))
|
||||||
{
|
{
|
||||||
|
|
@ -1209,10 +1210,12 @@ class MailClient
|
||||||
if (\count($aCompareArray) > \count(\array_diff($aCompareArray, $aValue)))
|
if (\count($aCompareArray) > \count(\array_diff($aCompareArray, $aValue)))
|
||||||
{
|
{
|
||||||
$aCriteriasResult[] = 'FLAGGED';
|
$aCriteriasResult[] = 'FLAGGED';
|
||||||
|
$bUseCache = false;
|
||||||
}
|
}
|
||||||
else if (\count($aCompareArray2) > \count(\array_diff($aCompareArray2, $aValue)))
|
else if (\count($aCompareArray2) > \count(\array_diff($aCompareArray2, $aValue)))
|
||||||
{
|
{
|
||||||
$aCriteriasResult[] = 'UNFLAGGED';
|
$aCriteriasResult[] = 'UNFLAGGED';
|
||||||
|
$bUseCache = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$aCompareArray = array('unread', 'unseen');
|
$aCompareArray = array('unread', 'unseen');
|
||||||
|
|
@ -1220,10 +1223,12 @@ class MailClient
|
||||||
if (\count($aCompareArray) > \count(\array_diff($aCompareArray, $aValue)))
|
if (\count($aCompareArray) > \count(\array_diff($aCompareArray, $aValue)))
|
||||||
{
|
{
|
||||||
$aCriteriasResult[] = 'UNSEEN';
|
$aCriteriasResult[] = 'UNSEEN';
|
||||||
|
$bUseCache = false;
|
||||||
}
|
}
|
||||||
else if (\count($aCompareArray2) > \count(\array_diff($aCompareArray2, $aValue)))
|
else if (\count($aCompareArray2) > \count(\array_diff($aCompareArray2, $aValue)))
|
||||||
{
|
{
|
||||||
$aCriteriasResult[] = 'SEEN';
|
$aCriteriasResult[] = 'SEEN';
|
||||||
|
$bUseCache = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1654,10 +1659,10 @@ class MailClient
|
||||||
{
|
{
|
||||||
$bIndexAsUid = true;
|
$bIndexAsUid = true;
|
||||||
$aIndexOrUids = null;
|
$aIndexOrUids = null;
|
||||||
|
$bUseCache = true;
|
||||||
|
|
||||||
$sSearchCriterias = $this->getImapSearchCriterias($sSearch, 0, true);
|
$sSearchCriterias = $this->getImapSearchCriterias($sSearch, 0, true, $bUseCache);
|
||||||
|
if ($iMessageCacheCount < $iMessageRealCount && $bUseCache && $oCacher && $oCacher->IsInited())
|
||||||
if ($iMessageCacheCount < $iMessageRealCount && $oCacher && $oCacher->IsInited())
|
|
||||||
{
|
{
|
||||||
$sSerializedHash =
|
$sSerializedHash =
|
||||||
($bUseSortIfSupported ? 'S': 'N').'/'.
|
($bUseSortIfSupported ? 'S': 'N').'/'.
|
||||||
|
|
|
||||||
|
|
@ -1717,12 +1717,11 @@ class Actions
|
||||||
$oAccount = $this->getAccountFromToken();
|
$oAccount = $this->getAccountFromToken();
|
||||||
|
|
||||||
$sEmail = \trim($this->GetActionParam('Email', ''));
|
$sEmail = \trim($this->GetActionParam('Email', ''));
|
||||||
$sLogin = \trim($this->GetActionParam('Login', ''));
|
|
||||||
$sPassword = $this->GetActionParam('Password', '');
|
$sPassword = $this->GetActionParam('Password', '');
|
||||||
|
|
||||||
$this->Logger()->AddSecret($sPassword);
|
$this->Logger()->AddSecret($sPassword);
|
||||||
|
|
||||||
$sParentEmail = 0 < \strlen($oAccount->ParentEmail()) ? $oAccount->ParentEmail() : $oAccount->Email();
|
$sParentEmail = $oAccount->ParentEmailHelper();
|
||||||
|
|
||||||
$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail, true);
|
$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail, true);
|
||||||
if ($oAccount->Email() === $sEmail || $sParentEmail === $sEmail)
|
if ($oAccount->Email() === $sEmail || $sParentEmail === $sEmail)
|
||||||
|
|
@ -1730,6 +1729,7 @@ class Actions
|
||||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountAlreadyExists);
|
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountAlreadyExists);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sLogin = '';
|
||||||
$oNewAccount = $this->LoginProcess($sEmail, $sLogin, $sPassword);
|
$oNewAccount = $this->LoginProcess($sEmail, $sLogin, $sPassword);
|
||||||
$oNewAccount->SetParentEmail($sParentEmail);
|
$oNewAccount->SetParentEmail($sParentEmail);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6784,7 +6784,7 @@ html.no-rgba .modal {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 24px;
|
font-size: 22px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
@ -6792,7 +6792,7 @@ html.no-rgba .modal {
|
||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
.e-pagenator .e-page.current .e-page-number {
|
.e-pagenator .e-page.current .e-page-number {
|
||||||
font-size: 28px;
|
font-size: 25px;
|
||||||
color: #333;
|
color: #333;
|
||||||
border-bottom: 2px solid #000;
|
border-bottom: 2px solid #000;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -17574,7 +17574,7 @@ WebMailAjaxRemoteStorage.prototype.messageList = function (fCallback, sFolderFul
|
||||||
iLimit = Utils.isUnd(iOffset) ? 20 : Utils.pInt(iLimit);
|
iLimit = Utils.isUnd(iOffset) ? 20 : Utils.pInt(iLimit);
|
||||||
sSearch = Utils.pString(sSearch);
|
sSearch = Utils.pString(sSearch);
|
||||||
|
|
||||||
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('has:')))
|
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('is:')))
|
||||||
{
|
{
|
||||||
this.defaultRequest(fCallback, 'MessageList', {},
|
this.defaultRequest(fCallback, 'MessageList', {},
|
||||||
'' === sSearch ? Consts.Defaults.DefaultAjaxTimeout : Consts.Defaults.SearchAjaxTimeout,
|
'' === sSearch ? Consts.Defaults.DefaultAjaxTimeout : Consts.Defaults.SearchAjaxTimeout,
|
||||||
|
|
|
||||||
2
rainloop/v/0.0.0/static/js/app.min.js
vendored
2
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue