mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Rewrite updateDisplay logic to not fail on some cases
This commit is contained in:
parent
5c3c08566f
commit
a15a9bd03a
@ -121,25 +121,17 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
scoreTable.Scores = new List<ScoreInfo>();
|
||||
|
||||
loading = false;
|
||||
|
||||
var scoreCount = scores?.Count ?? 0;
|
||||
scoreTable.Scores = scores?.Count > 1 ? scores : new List<ScoreInfo>();
|
||||
|
||||
if (scoreCount == 0)
|
||||
if (scores.Any())
|
||||
{
|
||||
topScore.Hide();
|
||||
return;
|
||||
topScore.Score = scores.FirstOrDefault();
|
||||
topScore.Show();
|
||||
}
|
||||
|
||||
topScore.Score = scores.FirstOrDefault();
|
||||
topScore.Show();
|
||||
|
||||
if (scoreCount < 2)
|
||||
return;
|
||||
|
||||
scoreTable.Scores = scores;
|
||||
else
|
||||
topScore.Hide();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user