Ensure all users are shown on leaderboard (even when API lookup fails)

This commit is contained in:
Dean Herbert 2022-04-12 11:54:30 +09:00
parent 577e29351e
commit 0ba95a4483

View File

@ -89,10 +89,13 @@ namespace osu.Game.Screens.Play.HUD
{
var users = task.GetResultSafely();
foreach (var user in users)
for (int i = 0; i < users.Length; i++)
{
if (user == null)
continue;
var user = users[i] ??= new APIUser
{
Id = playingUsers[i].UserID,
Username = "Unknown user",
};
var trackedUser = UserScores[user.Id];