Ensure updateLocalRoomSettings is only called after full population

This commit is contained in:
Dean Herbert 2021-12-02 14:31:59 +09:00
parent a8e17cb3a5
commit 624ec4580a

View File

@ -458,12 +458,18 @@ namespace osu.Game.Online.Multiplayer
{ {
GetAPIBeatmap(playlistItem.BeatmapID).ContinueWith(b => GetAPIBeatmap(playlistItem.BeatmapID).ContinueWith(b =>
{ {
Scheduler.Add(() => playlistItem.Beatmap.Value = b.Result); bool success = b.IsCompletedSuccessfully;
}, TaskContinuationOptions.OnlyOnRanToCompletion);
} Scheduler.Add(() =>
{
if (success)
playlistItem.Beatmap.Value = b.Result;
updateLocalRoomSettings(newSettings); updateLocalRoomSettings(newSettings);
}); });
});
}
});
return Task.CompletedTask; return Task.CompletedTask;
} }