From 3bea6619fa5cce516bc46a727f619a8e3a91cd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Sat, 24 Aug 2024 15:38:23 +0200 Subject: [PATCH] Enable all folder sync for gmail. --- Wino.Core/Extensions/GoogleIntegratorExtensions.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Wino.Core/Extensions/GoogleIntegratorExtensions.cs b/Wino.Core/Extensions/GoogleIntegratorExtensions.cs index 1aa319e3..b1634e05 100644 --- a/Wino.Core/Extensions/GoogleIntegratorExtensions.cs +++ b/Wino.Core/Extensions/GoogleIntegratorExtensions.cs @@ -76,7 +76,7 @@ namespace Wino.Core.Extensions public static MailItemFolder GetLocalFolder(this Label label, ListLabelsResponse labelsResponse, Guid accountId) { - bool isAllCapital = label.Name.All(a => char.IsUpper(a)); + var normalizedLabelName = GetFolderName(label); @@ -92,10 +92,10 @@ namespace Wino.Core.Extensions // without realizing that they are hidden in Gmail settings. Therefore, it makes more sense to ignore Gmail's configuration // since Wino allows folder visibility configuration separately. - // Overridden hidden labels are shown in the UI, but they have their synchronization disabled. - // This is mainly because 'All Mails' label is hidden by default in Gmail, but there is no point to download all mails. + // Overridden hidden labels are shown in the UI. + // Also Gmail does not support folder sync enable/disable options due to history changes. + // By default all folders will be enabled for synchronization. - bool shouldEnableSynchronization = label.LabelListVisibility != FOLDER_HIDE_IDENTIFIER; bool isHidden = false; bool isChildOfCategoryFolder = label.Name.StartsWith(CATEGORY_PREFIX); @@ -114,7 +114,7 @@ namespace Wino.Core.Extensions RemoteFolderId = label.Id, Id = Guid.NewGuid(), MailAccountId = accountId, - IsSynchronizationEnabled = shouldEnableSynchronization, + IsSynchronizationEnabled = true, SpecialFolderType = specialFolderType, IsSystemFolder = isSystemFolder, IsSticky = isSticky,