mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 10:42:54 +08:00
Fix loggining on start even after logout and exit
This commit is contained in:
parent
bba4c46ae3
commit
1c79ebff9f
@ -117,6 +117,8 @@ namespace osu.Game
|
||||
//refresh token may have changed.
|
||||
if (Config != null && API != null)
|
||||
{
|
||||
Config.Set(OsuConfig.Username, Config.Get<bool>(OsuConfig.SaveUsername) ? API.Username : string.Empty);
|
||||
Config.Set(OsuConfig.Password, Config.Get<bool>(OsuConfig.SavePassword) ? API.Password : string.Empty);
|
||||
Config.Set(OsuConfig.Token, Config.Get<bool>(OsuConfig.SavePassword) ? API.Token : string.Empty);
|
||||
Config.Save();
|
||||
}
|
||||
|
@ -26,12 +26,6 @@ namespace osu.Game.Overlays.Options.General
|
||||
{
|
||||
api?.Register(this);
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
private void performLogout()
|
||||
{
|
||||
api.Logout();
|
||||
//TODO: set null strings in username, password, token
|
||||
}
|
||||
|
||||
public void APIStateChanged(APIAccess api, APIState state)
|
||||
@ -73,7 +67,7 @@ namespace osu.Game.Overlays.Options.General
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Sign out",
|
||||
Action = performLogout
|
||||
Action = api.Logout
|
||||
}
|
||||
};
|
||||
break;
|
||||
@ -101,7 +95,6 @@ namespace osu.Game.Overlays.Options.General
|
||||
AutoSizeAxes = Axes.Y;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
Spacing = new Vector2(0, 5);
|
||||
// TODO: Wire things up
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "Username" },
|
||||
@ -137,7 +130,7 @@ namespace osu.Game.Overlays.Options.General
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Register",
|
||||
//Action = performLogin
|
||||
//Action = registerLink
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user