1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Fix user population not immediate on bracket loading

This commit is contained in:
Salman Ahmed 2021-02-17 07:29:45 +03:00
parent bef0e5cfa1
commit 3b4e02e5c7

View File

@ -152,7 +152,7 @@ namespace osu.Game.Tournament
{ {
if (string.IsNullOrEmpty(p.Username) || p.Statistics == null) if (string.IsNullOrEmpty(p.Username) || p.Statistics == null)
{ {
PopulateUser(p); PopulateUser(p, immediate: true);
addedInfo = true; addedInfo = true;
} }
} }
@ -211,7 +211,7 @@ namespace osu.Game.Tournament
return addedInfo; return addedInfo;
} }
public void PopulateUser(User user, Action success = null, Action failure = null) public void PopulateUser(User user, Action success = null, Action failure = null, bool immediate = false)
{ {
var req = new GetUserRequest(user.Id, Ruleset.Value); var req = new GetUserRequest(user.Id, Ruleset.Value);
@ -231,7 +231,10 @@ namespace osu.Game.Tournament
failure?.Invoke(); failure?.Invoke();
}; };
API.Queue(req); if (immediate)
API.Perform(req);
else
API.Queue(req);
} }
protected override void LoadComplete() protected override void LoadComplete()