Fix some bugs caused by order of operations.

This commit is contained in:
2023-05-14 19:53:47 -05:00
parent f21a170eb1
commit 841dbccc29
2 changed files with 11 additions and 6 deletions

View File

@@ -112,16 +112,17 @@ public class AccountManager
public async Task LogoutAsync()
{
await accountState.SetUser(null);
var platform = await localStorage.GetAccountPlatform();
await localStorage.DeleteAccountPlatform();
if (platform == WhichAccountPlatform.Guest)
{
await shogiApi.GuestLogout();
await accountState.SetUser(null);
}
else if (platform == WhichAccountPlatform.Microsoft)
{
await accountState.SetUser(null);
navigation.NavigateToLogout("authentication/logout");
}
}