Fixed an issue where setting archive folder as special folder does not update the configuration.

This commit is contained in:
Burak Kaan Köse
2024-06-21 04:24:04 +02:00
parent cfdd32708a
commit b4103a4edb

View File

@@ -272,7 +272,8 @@ namespace Wino.Core.Services
await Task.WhenAll(UpdateSystemFolderInternalAsync(configuration.SentFolder, SpecialFolderType.Sent), await Task.WhenAll(UpdateSystemFolderInternalAsync(configuration.SentFolder, SpecialFolderType.Sent),
UpdateSystemFolderInternalAsync(configuration.DraftFolder, SpecialFolderType.Draft), UpdateSystemFolderInternalAsync(configuration.DraftFolder, SpecialFolderType.Draft),
UpdateSystemFolderInternalAsync(configuration.JunkFolder, SpecialFolderType.Junk), UpdateSystemFolderInternalAsync(configuration.JunkFolder, SpecialFolderType.Junk),
UpdateSystemFolderInternalAsync(configuration.TrashFolder, SpecialFolderType.Deleted)); UpdateSystemFolderInternalAsync(configuration.TrashFolder, SpecialFolderType.Deleted),
UpdateSystemFolderInternalAsync(configuration.ArchiveFolder, SpecialFolderType.Archive));
await _accountService.UpdateAccountAsync(account); 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) if (folder == null)
{ {
@@ -392,6 +393,8 @@ namespace Wino.Core.Services
await Connection.DeleteAsync(folder).ConfigureAwait(false); await Connection.DeleteAsync(folder).ConfigureAwait(false);
// TODO: Delete all mail copies for this folder.
ReportUIChange(new FolderRemovedMessage(folder, account)); ReportUIChange(new FolderRemovedMessage(folder, account));
} }