Skip to content

Commit

Permalink
Clicking on loaded account menu item will automatically go to Inbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaankose committed Feb 16, 2025
1 parent 8800d11 commit df3b5c4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Wino.Mail.ViewModels/AppShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,18 @@ public async Task MenuItemInvokedOrSelectedAsync(IMenuItem clickedMenuItem, obje
{
NavigationService.Navigate(WinoPage.ManageAccountsPage, parameter, NavigationReferenceFrame.ShellFrame, NavigationTransitionType.None);
}
else if (clickedMenuItem is IAccountMenuItem clickedAccountMenuItem && latestSelectedAccountMenuItem != clickedAccountMenuItem)
else if (clickedMenuItem is IAccountMenuItem clickedAccountMenuItem)
{
await ChangeLoadedAccountAsync(clickedAccountMenuItem);
// Changing loaded account.
if (latestSelectedAccountMenuItem != clickedAccountMenuItem)
{
await ChangeLoadedAccountAsync(clickedAccountMenuItem);
}
else
{
// Clicked on the same account. Just navigate to Inbox.
await NavigateInboxAsync(clickedAccountMenuItem);
}
}
}

Expand Down

0 comments on commit df3b5c4

Please sign in to comment.