Ignore folder filter if label specific query is passed to Gmail.

This commit is contained in:
Burak Kaan Köse
2025-02-23 10:21:58 +01:00
parent c091fffe90
commit 9d0a2f6535

View File

@@ -963,7 +963,12 @@ public class GmailSynchronizer : WinoSynchronizer<IClientServiceRequest, Message
do
{
if (folders?.Any() ?? false)
if (queryText.StartsWith("label:") || queryText.StartsWith("in:"))
{
// Ignore the folders if the query starts with these keywords.
// User is trying to list everything.
}
else if (folders?.Any() ?? false)
{
request.LabelIds = folders.Select(a => a.RemoteFolderId).ToList();
}