Fix account signature preferences during draft creation (#314)

* Pass account ID instead of account to draft creation method, since account object can be stale.

* Configure await
This commit is contained in:
Tiktack
2024-08-12 00:56:26 +02:00
committed by GitHub
parent 5912adff93
commit cbd5a515a9
4 changed files with 6 additions and 5 deletions

View File

@@ -51,8 +51,9 @@ namespace Wino.Core.Services
_preferencesService = preferencesService;
}
public async Task<(MailCopy draftMailCopy, string draftBase64MimeMessage)> CreateDraftAsync(MailAccount composerAccount, DraftCreationOptions draftCreationOptions)
public async Task<(MailCopy draftMailCopy, string draftBase64MimeMessage)> CreateDraftAsync(Guid accountId, DraftCreationOptions draftCreationOptions)
{
var composerAccount = await _accountService.GetAccountAsync(accountId).ConfigureAwait(false);
var createdDraftMimeMessage = await CreateDraftMimeAsync(composerAccount, draftCreationOptions);
var draftFolder = await _folderService.GetSpecialFolderByAccountIdAsync(composerAccount.Id, SpecialFolderType.Draft);