Replace Scores property with DisplayScores method

Also adds null checks to prevent crashes in tests.
This commit is contained in:
TheWildTree
2020-03-04 19:24:52 +01:00
parent 4d19278df4
commit 9aacc3f5ae
3 changed files with 20 additions and 19 deletions

View File

@ -53,7 +53,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
if (value?.Scores.Any() != true)
{
scoreTable.Scores = null;
scoreTable.ClearScores();
scoreTable.Hide();
return;
}
@ -61,8 +61,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
var scoreInfos = value.Scores.Select(s => s.CreateScoreInfo(rulesets)).ToList();
var topScore = scoreInfos.First();
scoreTable.Scores = scoreInfos;
scoreTable.IsBeatmapRanked = topScore.Beatmap.Status == BeatmapSetOnlineStatus.Ranked;
scoreTable.DisplayScores(scoreInfos, topScore.Beatmap?.Status == BeatmapSetOnlineStatus.Ranked);
scoreTable.Show();
var userScore = value.UserScore;