Fix to use the correct $oParams->hash()

This commit is contained in:
the-djmaze 2024-03-25 10:43:51 +01:00
parent 8bcd0a3521
commit 93a4d5ba88

View file

@ -59,15 +59,22 @@ trait Messages
$oAccount = $this->initMailClientConnection(); $oAccount = $this->initMailClientConnection();
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
if ($oSettingsLocal instanceof \RainLoop\Settings) {
$oParams->bHideDeleted = !empty($oSettingsLocal->GetConf('HideDeleted', 1));
}
// $oParams->bUseSort = $this->ImapClient()->hasCapability('SORT');
$oParams->bUseSort = true;
if ($sHash) { if ($sHash) {
// $sFolderHash = $this->MailClient()->FolderHash($oParams->sFolderName);
$oInfo = $this->ImapClient()->FolderStatusAndSelect($oParams->sFolderName); $oInfo = $this->ImapClient()->FolderStatusAndSelect($oParams->sFolderName);
$aRequestHash = \explode('-', $sHash); $aRequestHash = \explode('-', $sHash);
$sFolderHash = $oInfo->etag; $sNewHash = $oParams->hash() . '-' . $oInfo->etag;
$sHash = $oParams->hash() . '-' . $sFolderHash; if ($aRequestHash[1] == $oInfo->etag) {
if ($aRequestHash[1] == $sFolderHash) { $this->verifyCacheByKey($sNewHash);
$this->verifyCacheByKey($sHash);
} }
$sHash = $sNewHash;
} }
try try
@ -76,14 +83,6 @@ trait Messages
$oParams->oCacher = $this->Cacher($oAccount); $oParams->oCacher = $this->Cacher($oAccount);
} }
// $oParams->bUseSort = $this->ImapClient()->hasCapability('SORT');
$oParams->bUseSort = true;
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
if ($oSettingsLocal instanceof \RainLoop\Settings) {
$oParams->bHideDeleted = !empty($oSettingsLocal->GetConf('HideDeleted', 1));
}
// \ignore_user_abort(true); // \ignore_user_abort(true);
$oMessageList = $this->MailClient()->MessageList($oParams); $oMessageList = $this->MailClient()->MessageList($oParams);
if ($sHash) { if ($sHash) {