Go back to welcome page when the last account is removed.

This commit is contained in:
Burak Kaan Köse
2026-03-09 14:18:13 +01:00
parent 859a5bb117
commit 9b567c4bac
9 changed files with 39 additions and 233 deletions
+11 -4
View File
@@ -427,7 +427,7 @@ public partial class MailAppShellViewModel : MailBaseViewModel,
{
if (PreferencesService.StartupEntityId == null)
{
NavigationService.Navigate(WinoPage.WelcomePage);
NavigateToWelcomeWizard();
}
else
{
@@ -451,8 +451,8 @@ public partial class MailAppShellViewModel : MailBaseViewModel,
}
else
{
// Fallback to welcome page if startup entity is not found.
NavigationService.Navigate(WinoPage.WelcomePage);
// Fallback to the welcome wizard if startup entity is not found.
NavigateToWelcomeWizard();
}
}
}
@@ -1038,10 +1038,17 @@ public partial class MailAppShellViewModel : MailBaseViewModel,
else
{
await ExecuteUIThread(() => SelectedMenuItem = null);
NavigationService.Navigate(WinoPage.WelcomePage);
NavigateToWelcomeWizard();
}
}
private void NavigateToWelcomeWizard()
=> NavigationService.Navigate(
WinoPage.WelcomeHostPage,
null,
NavigationReferenceFrame.ShellFrame,
NavigationTransitionType.None);
private bool IsAccountCurrentlyLoaded(Guid accountId)
{
return latestSelectedAccountMenuItem?.HoldingAccounts?.Any(a => a.Id == accountId) == true;