mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:03:22 +08:00
Rewrite query to be easier to understand
This commit is contained in:
parent
f199d6c521
commit
c49d0a5013
@ -74,10 +74,9 @@ namespace osu.Game.Scoring
|
||||
|
||||
var totalScores = await Task.WhenAll(scores.Select(s => GetTotalScoreAsync(s, cancellationToken: cancellationToken))).ConfigureAwait(false);
|
||||
|
||||
return scores.Select((s, i) => (index: i, score: s))
|
||||
.OrderByDescending(key => totalScores[key.index])
|
||||
.ThenBy(key => key.score.OnlineScoreID)
|
||||
.Select(key => key.score)
|
||||
return scores.Select((score, index) => (score: score, totalScore: totalScores[index]))
|
||||
.OrderByDescending(g => g.totalScore)
|
||||
.Select(g => g.score)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user