From a87df2e9f6a6c32a2bb415850a97d4674c024518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Sat, 17 Aug 2024 19:54:44 +0200 Subject: [PATCH] Fixed an issue where deleting account navigates back to mail list of the next account. --- Wino.Mail.ViewModels/AppShellViewModel.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Wino.Mail.ViewModels/AppShellViewModel.cs b/Wino.Mail.ViewModels/AppShellViewModel.cs index 5e7b0b53..38c78e07 100644 --- a/Wino.Mail.ViewModels/AppShellViewModel.cs +++ b/Wino.Mail.ViewModels/AppShellViewModel.cs @@ -795,7 +795,7 @@ namespace Wino.Mail.ViewModels } protected override void OnAccountRemoved(MailAccount removedAccount) - => Messenger.Send(new AccountsMenuRefreshRequested(true)); + => Messenger.Send(new AccountsMenuRefreshRequested(false)); protected override async void OnAccountCreated(MailAccount createdAccount) { @@ -877,12 +877,9 @@ namespace Wino.Mail.ViewModels { await RecreateMenuItemsAsync(); - if (message.AutomaticallyNavigateFirstItem) + if (MenuItems.FirstOrDefault(a => a is IAccountMenuItem) is IAccountMenuItem firstAccount) { - if (MenuItems.FirstOrDefault(a => a is IAccountMenuItem) is IAccountMenuItem firstAccount) - { - await ChangeLoadedAccountAsync(firstAccount); - } + await ChangeLoadedAccountAsync(firstAccount, message.AutomaticallyNavigateFirstItem); } }