Don't clear username on logout

This commit is contained in:
smoogipoo 2018-12-22 17:54:19 +09:00
parent 0757beb3b8
commit 30dbc36fce

View File

@ -161,7 +161,7 @@ namespace osu.Game.Online.API
//hard bail if we can't get a valid access token. //hard bail if we can't get a valid access token.
if (authentication.RequestAccessToken() == null) if (authentication.RequestAccessToken() == null)
{ {
Logout(false); Logout();
continue; continue;
} }
@ -293,7 +293,7 @@ namespace osu.Game.Online.API
switch (statusCode) switch (statusCode)
{ {
case HttpStatusCode.Unauthorized: case HttpStatusCode.Unauthorized:
Logout(false); Logout();
return true; return true;
case HttpStatusCode.RequestTimeout: case HttpStatusCode.RequestTimeout:
failureCount++; failureCount++;
@ -342,10 +342,9 @@ namespace osu.Game.Online.API
} }
} }
public void Logout(bool clearUsername = true) public void Logout()
{ {
flushQueue(); flushQueue();
if (clearUsername) ProvidedUsername = null;
password = null; password = null;
authentication.Clear(); authentication.Clear();
LocalUser.Value = createGuestUser(); LocalUser.Value = createGuestUser();