Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions InterlinedList/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ protected override async void OnStartup(StartupEventArgs e)
// so drop the session instead and let the login screen surface
// the server's own rejection when they try again (#50).
AppLog.Info("Restored session belongs to a closed account; discarding it and showing login.");
AppServices.Session.Logout();
// ClearLocalSession, not LogoutAsync: the account is closed, so
// there is no useful server call to make — and both call sites are
// synchronous. LogoutAsync is for a user-initiated sign-out.
AppServices.Session.ClearLocalSession();
ShowLoginWindow();
}
else if (restored)
Expand Down Expand Up @@ -133,7 +136,10 @@ private void ShowLoginWindow()
if (IsAccountClosed())
{
AppLog.Info("Sign-in produced a closed account; refusing to open the shell.");
AppServices.Session.Logout();
// ClearLocalSession, not LogoutAsync: the account is closed, so
// there is no useful server call to make — and both call sites are
// synchronous. LogoutAsync is for a user-initiated sign-out.
AppServices.Session.ClearLocalSession();
return;
}

Expand Down
Loading