Fix some bugs caused by order of operations.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user