From b4103a4edb08bac6d644a0307049885ef1dfd8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Fri, 21 Jun 2024 04:24:04 +0200 Subject: [PATCH] Fixed an issue where setting archive folder as special folder does not update the configuration. --- Wino.Core/Services/FolderService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Wino.Core/Services/FolderService.cs b/Wino.Core/Services/FolderService.cs index c5afbcb4..dd4ad445 100644 --- a/Wino.Core/Services/FolderService.cs +++ b/Wino.Core/Services/FolderService.cs @@ -272,7 +272,8 @@ namespace Wino.Core.Services await Task.WhenAll(UpdateSystemFolderInternalAsync(configuration.SentFolder, SpecialFolderType.Sent), UpdateSystemFolderInternalAsync(configuration.DraftFolder, SpecialFolderType.Draft), UpdateSystemFolderInternalAsync(configuration.JunkFolder, SpecialFolderType.Junk), - UpdateSystemFolderInternalAsync(configuration.TrashFolder, SpecialFolderType.Deleted)); + UpdateSystemFolderInternalAsync(configuration.TrashFolder, SpecialFolderType.Deleted), + UpdateSystemFolderInternalAsync(configuration.ArchiveFolder, SpecialFolderType.Archive)); await _accountService.UpdateAccountAsync(account); @@ -347,7 +348,7 @@ namespace Wino.Core.Services } } - private async Task UpdateFolderAsync(MailItemFolder folder) + public async Task UpdateFolderAsync(MailItemFolder folder) { if (folder == null) { @@ -392,6 +393,8 @@ namespace Wino.Core.Services await Connection.DeleteAsync(folder).ConfigureAwait(false); + // TODO: Delete all mail copies for this folder. + ReportUIChange(new FolderRemovedMessage(folder, account)); }