From 298344c2ab16ea47dbebf7b5b06e6b67a969b779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Thu, 22 Aug 2024 00:57:46 +0200 Subject: [PATCH] Remove async from adding attachments. --- Wino.Mail.ViewModels/ComposePageViewModel.cs | 10 ---------- Wino.Mail/Views/ComposePage.xaml.cs | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Wino.Mail.ViewModels/ComposePageViewModel.cs b/Wino.Mail.ViewModels/ComposePageViewModel.cs index 702ef338..13643abf 100644 --- a/Wino.Mail.ViewModels/ComposePageViewModel.cs +++ b/Wino.Mail.ViewModels/ComposePageViewModel.cs @@ -204,16 +204,6 @@ namespace Wino.Mail.ViewModels await _worker.ExecuteAsync(draftSendPreparationRequest); } - public async Task IncludeAttachmentAsync(MailAttachmentViewModel viewModel) - { - //if (bodyBuilder == null) return; - - //bodyBuilder.Attachments.Add(viewModel.FileName, new MemoryStream(viewModel.Content)); - - //LoadAttachments(); - IncludedAttachments.Add(viewModel); - } - public async Task UpdateMimeChangesAsync() { if (isUpdatingMimeBlocked || CurrentMimeMessage == null || ComposingAccount == null || CurrentMailDraftItem == null) return; diff --git a/Wino.Mail/Views/ComposePage.xaml.cs b/Wino.Mail/Views/ComposePage.xaml.cs index 935bc373..166b1722 100644 --- a/Wino.Mail/Views/ComposePage.xaml.cs +++ b/Wino.Mail/Views/ComposePage.xaml.cs @@ -239,7 +239,7 @@ namespace Wino.Views { var attachmentViewModel = await file.ToAttachmentViewModelAsync(); - await ViewModel.IncludeAttachmentAsync(attachmentViewModel); + ViewModel.IncludedAttachments.Add(attachmentViewModel); } }