mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 18:27:26 +08:00
Merge branch 'master' into open-profile-hotkey
This commit is contained in:
commit
6f1fdd4c34
@ -137,6 +137,17 @@ namespace osu.Game.Online.API
|
||||
|
||||
state.Value = APIState.Connecting;
|
||||
|
||||
if (localUser.IsDefault)
|
||||
{
|
||||
// Show a placeholder user if saved credentials are available.
|
||||
// This is useful for storing local scores and showing a placeholder username after starting the game,
|
||||
// until a valid connection has been established.
|
||||
localUser.Value = new APIUser
|
||||
{
|
||||
Username = ProvidedUsername,
|
||||
};
|
||||
}
|
||||
|
||||
// save the username at this point, if the user requested for it to be.
|
||||
config.SetValue(OsuSetting.Username, config.Get<bool>(OsuSetting.SaveUsername) ? ProvidedUsername : string.Empty);
|
||||
|
||||
@ -402,7 +413,7 @@ namespace osu.Game.Online.API
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLoggedIn => localUser.Value.Id > 1; // TODO: should this also be true if attempting to connect?
|
||||
public bool IsLoggedIn => State.Value > APIState.Offline;
|
||||
|
||||
public void Queue(APIRequest request)
|
||||
{
|
||||
|
@ -104,11 +104,11 @@ namespace osu.Game.Overlays
|
||||
filterControl.CardSize.BindValueChanged(_ => onCardSizeChanged());
|
||||
|
||||
apiUser = api.LocalUser.GetBoundCopy();
|
||||
apiUser.BindValueChanged(_ =>
|
||||
apiUser.BindValueChanged(_ => Schedule(() =>
|
||||
{
|
||||
if (api.IsLoggedIn)
|
||||
addContentToResultsArea(Drawable.Empty());
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
public void ShowWithSearch(string query)
|
||||
|
@ -249,6 +249,9 @@ namespace osu.Game.Screens.Play
|
||||
// this is intentionally done in two stages to ensure things are in a loaded state before exposing the ruleset to skin sources.
|
||||
GameplayClockContainer.Add(rulesetSkinProvider);
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
rulesetSkinProvider.AddRange(new Drawable[]
|
||||
{
|
||||
failAnimationLayer = new FailAnimation(DrawableRuleset)
|
||||
@ -279,6 +282,9 @@ namespace osu.Game.Screens.Play
|
||||
},
|
||||
});
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
if (Configuration.AllowRestart)
|
||||
{
|
||||
rulesetSkinProvider.Add(new HotkeyRetryOverlay
|
||||
|
Loading…
Reference in New Issue
Block a user