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();
$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) {
// $sFolderHash = $this->MailClient()->FolderHash($oParams->sFolderName);
$oInfo = $this->ImapClient()->FolderStatusAndSelect($oParams->sFolderName);
$aRequestHash = \explode('-', $sHash);
$sFolderHash = $oInfo->etag;
$sHash = $oParams->hash() . '-' . $sFolderHash;
if ($aRequestHash[1] == $sFolderHash) {
$this->verifyCacheByKey($sHash);
$sNewHash = $oParams->hash() . '-' . $oInfo->etag;
if ($aRequestHash[1] == $oInfo->etag) {
$this->verifyCacheByKey($sNewHash);
}
$sHash = $sNewHash;
}
try
@ -76,14 +83,6 @@ trait Messages
$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);
$oMessageList = $this->MailClient()->MessageList($oParams);
if ($sHash) {