mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +03:00
Resolve #281
This commit is contained in:
parent
1934360cf4
commit
ec6a79d9d6
1 changed files with 12 additions and 17 deletions
|
|
@ -913,26 +913,21 @@ class MailClient
|
||||||
{
|
{
|
||||||
$aSearchedUids = $this->GetUids($oParams->oCacher, $sSearch,
|
$aSearchedUids = $this->GetUids($oParams->oCacher, $sSearch,
|
||||||
$oMessageCollection->FolderName, $oMessageCollection->FolderHash);
|
$oMessageCollection->FolderName, $oMessageCollection->FolderHash);
|
||||||
|
if ($bUseThreads && !$oParams->iThreadUid) {
|
||||||
if (\count($aSearchedUids))
|
$aUids = \array_filter($aUids, function($iUid) use ($aSearchedUids, $aAllThreads) {
|
||||||
{
|
|
||||||
$aNewUids = array();
|
|
||||||
foreach ($aUids as $iUid)
|
|
||||||
{
|
|
||||||
if (\in_array($iUid, $aSearchedUids)) {
|
if (\in_array($iUid, $aSearchedUids)) {
|
||||||
$aNewUids[] = $iUid;
|
return true;
|
||||||
} else if ($bUseThreads && !$oParams->iThreadUid) {
|
}
|
||||||
foreach ($aAllThreads as $aMap) {
|
foreach ($aAllThreads as $aMap) {
|
||||||
if (\in_array($iUid, $aMap) && \array_intersect($aSearchedUids, $aMap)) {
|
if (\in_array($iUid, $aMap) && \array_intersect($aSearchedUids, $aMap)) {
|
||||||
$aNewUids[] = $iUid;
|
return true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
} else {
|
||||||
$aUids = \array_unique($aNewUids);
|
$aUids = \array_filter($aUids, function($iUid) use ($aSearchedUids) {
|
||||||
unset($aNewUids);
|
return \in_array($iUid, $aSearchedUids);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue