Improved online search performance when doing local operations (#584)

* Improved online search performance when doing local operations

* Retruning an empty list on no item searches.

* Fixed an issue with batch imap downloads.

---------

Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
This commit is contained in:
Aleh Khantsevich
2025-02-23 22:17:40 +01:00
committed by GitHub
parent 31b859ba1a
commit 9facfaffa8
8 changed files with 148 additions and 144 deletions
+1 -12
View File
@@ -1054,18 +1054,7 @@ public class OutlookSynchronizer : WinoSynchronizer<RequestInformation, Message,
}
// Get results from database and return.
var searchResults = new List<MailCopy>();
foreach (var messageId in existingMessageIds)
{
var copy = await _outlookChangeProcessor.GetMailCopyAsync(messageId).ConfigureAwait(false);
if (copy == null) continue;
searchResults.Add(copy);
}
return searchResults;
return await _outlookChangeProcessor.GetMailCopiesAsync(existingMessageIds);
}
private async Task<MimeMessage> DownloadMimeMessageAsync(string messageId, CancellationToken cancellationToken = default)