Create SendDraftRequest implementation and handle missing SentFolder synchronization.

This commit is contained in:
Burak Kaan Köse
2024-06-11 14:19:08 +02:00
parent 69a10c754a
commit 0e9fd4373e
2 changed files with 21 additions and 11 deletions

View File

@@ -160,15 +160,7 @@ namespace Wino.Mail.ViewModels
isUpdatingMimeBlocked = true;
var assignedAccount = CurrentMailDraftItem.AssignedAccount;
MailItemFolder sentFolder = null;
// Load the Sent folder if user wanted to have a copy there.
if (assignedAccount.Preferences.ShouldAppendMessagesToSentFolder)
{
sentFolder = await _folderService.GetSpecialFolderByAccountIdAsync(assignedAccount.Id, SpecialFolderType.Sent);
}
var sentFolder = await _folderService.GetSpecialFolderByAccountIdAsync(assignedAccount.Id, SpecialFolderType.Sent);
var draftSendPreparationRequest = new SendDraftPreparationRequest(CurrentMailDraftItem.MailCopy, currentMimeMessage, CurrentMailDraftItem.AssignedFolder, sentFolder, CurrentMailDraftItem.AssignedAccount.Preferences);
await _worker.ExecuteAsync(draftSendPreparationRequest);