Skip to content

Commit

Permalink
Merge pull request #31508 from peppy/api-startup-state
Browse files Browse the repository at this point in the history
Fix replays not correctly pre-importing beatmap when arriving from a cold start
  • Loading branch information
smoogipoo authored Jan 14, 2025
2 parents 0e20c0e + 91fa2e7 commit ad14720
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions osu.Game/Online/API/APIAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,14 @@ public APIAccess(OsuGameBase game, OsuConfigManager config, EndpointConfiguratio

config.BindWith(OsuSetting.UserOnlineStatus, configStatus);

// Early call to ensure the local user / "logged in" state is correct immediately.
setPlaceholderLocalUser();
if (HasLogin)
{
// Early call to ensure the local user / "logged in" state is correct immediately.
setPlaceholderLocalUser();

// This is required so that Queue() requests during startup sequence don't fail due to "not logged in".
state.Value = APIState.Connecting;
}

localUser.BindValueChanged(u =>
{
Expand Down

0 comments on commit ad14720

Please sign in to comment.