mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 01:17:04 +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);
|
||||
sSearch = Utils.pString(sSearch);
|
||||
|
||||
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('has:')))
|
||||
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('is:')))
|
||||
{
|
||||
this.defaultRequest(fCallback, 'MessageList', {},
|
||||
'' === sSearch ? Consts.Defaults.DefaultAjaxTimeout : Consts.Defaults.SearchAjaxTimeout,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
display: inline-block;
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
font-size: 24px;
|
||||
font-size: 22px;
|
||||
padding: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
}
|
||||
|
||||
&.current .e-page-number {
|
||||
font-size: 28px;
|
||||
font-size: 25px;
|
||||
color: #333;
|
||||
border-bottom: 2px solid #000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1085,8 +1085,9 @@ class MailClient
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getImapSearchCriterias($sSearch, $iTimeZoneOffset = 0, $bAddNotDeleted = false)
|
||||
private function getImapSearchCriterias($sSearch, $iTimeZoneOffset = 0, $bAddNotDeleted = false, &$bUseCache = true)
|
||||
{
|
||||
$bUseCache = true;
|
||||
$aCriteriasResult = array();
|
||||
if (0 < \strlen(\trim($sSearch)))
|
||||
{
|
||||
|
|
@ -1209,10 +1210,12 @@ class MailClient
|
|||
if (\count($aCompareArray) > \count(\array_diff($aCompareArray, $aValue)))
|
||||
{
|
||||
$aCriteriasResult[] = 'FLAGGED';
|
||||
$bUseCache = false;
|
||||
}
|
||||
else if (\count($aCompareArray2) > \count(\array_diff($aCompareArray2, $aValue)))
|
||||
{
|
||||
$aCriteriasResult[] = 'UNFLAGGED';
|
||||
$bUseCache = false;
|
||||
}
|
||||
|
||||
$aCompareArray = array('unread', 'unseen');
|
||||
|
|
@ -1220,10 +1223,12 @@ class MailClient
|
|||
if (\count($aCompareArray) > \count(\array_diff($aCompareArray, $aValue)))
|
||||
{
|
||||
$aCriteriasResult[] = 'UNSEEN';
|
||||
$bUseCache = false;
|
||||
}
|
||||
else if (\count($aCompareArray2) > \count(\array_diff($aCompareArray2, $aValue)))
|
||||
{
|
||||
$aCriteriasResult[] = 'SEEN';
|
||||
$bUseCache = false;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1654,10 +1659,10 @@ class MailClient
|
|||
{
|
||||
$bIndexAsUid = true;
|
||||
$aIndexOrUids = null;
|
||||
$bUseCache = true;
|
||||
|
||||
$sSearchCriterias = $this->getImapSearchCriterias($sSearch, 0, true);
|
||||
|
||||
if ($iMessageCacheCount < $iMessageRealCount && $oCacher && $oCacher->IsInited())
|
||||
$sSearchCriterias = $this->getImapSearchCriterias($sSearch, 0, true, $bUseCache);
|
||||
if ($iMessageCacheCount < $iMessageRealCount && $bUseCache && $oCacher && $oCacher->IsInited())
|
||||
{
|
||||
$sSerializedHash =
|
||||
($bUseSortIfSupported ? 'S': 'N').'/'.
|
||||
|
|
|
|||
|
|
@ -1717,12 +1717,11 @@ class Actions
|
|||
$oAccount = $this->getAccountFromToken();
|
||||
|
||||
$sEmail = \trim($this->GetActionParam('Email', ''));
|
||||
$sLogin = \trim($this->GetActionParam('Login', ''));
|
||||
$sPassword = $this->GetActionParam('Password', '');
|
||||
|
||||
$this->Logger()->AddSecret($sPassword);
|
||||
|
||||
$sParentEmail = 0 < \strlen($oAccount->ParentEmail()) ? $oAccount->ParentEmail() : $oAccount->Email();
|
||||
$sParentEmail = $oAccount->ParentEmailHelper();
|
||||
|
||||
$sEmail = \MailSo\Base\Utils::IdnToAscii($sEmail, true);
|
||||
if ($oAccount->Email() === $sEmail || $sParentEmail === $sEmail)
|
||||
|
|
@ -1730,6 +1729,7 @@ class Actions
|
|||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AccountAlreadyExists);
|
||||
}
|
||||
|
||||
$sLogin = '';
|
||||
$oNewAccount = $this->LoginProcess($sEmail, $sLogin, $sPassword);
|
||||
$oNewAccount->SetParentEmail($sParentEmail);
|
||||
|
||||
|
|
|
|||
|
|
@ -6784,7 +6784,7 @@ html.no-rgba .modal {
|
|||
display: inline-block;
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
font-size: 24px;
|
||||
font-size: 22px;
|
||||
padding: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
@ -6792,7 +6792,7 @@ html.no-rgba .modal {
|
|||
color: #555;
|
||||
}
|
||||
.e-pagenator .e-page.current .e-page-number {
|
||||
font-size: 28px;
|
||||
font-size: 25px;
|
||||
color: #333;
|
||||
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);
|
||||
sSearch = Utils.pString(sSearch);
|
||||
|
||||
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('has:')))
|
||||
if ('' !== sFolderHash && ('' === sSearch || -1 === sSearch.indexOf('is:')))
|
||||
{
|
||||
this.defaultRequest(fCallback, 'MessageList', {},
|
||||
'' === 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