Fixed crashing issue with disposing composing page.

This commit is contained in:
Burak Kaan Köse
2024-08-21 23:14:59 +02:00
parent f627226da9
commit bd9cbe30c5
3 changed files with 16 additions and 16 deletions

View File

@@ -214,7 +214,7 @@ namespace Wino.Mail.ViewModels
IncludedAttachments.Add(viewModel);
}
private async Task UpdateMimeChangesAsync()
public async Task UpdateMimeChangesAsync()
{
if (isUpdatingMimeBlocked || CurrentMimeMessage == null || ComposingAccount == null || CurrentMailDraftItem == null) return;
@@ -338,13 +338,12 @@ namespace Wino.Mail.ViewModels
}
}
public override async void OnNavigatedFrom(NavigationMode mode, object parameters)
public override void OnNavigatedFrom(NavigationMode mode, object parameters)
{
base.OnNavigatedFrom(mode, parameters);
await UpdateMimeChangesAsync().ConfigureAwait(false);
Messenger.Send(new KillChromiumRequested());
/// Do not put any code here.
/// Make sure to use Page's OnNavigatedTo instead.
}
public override async void OnNavigatedTo(NavigationMode mode, object parameters)