mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Merge pull request #20300 from peppy/stable-sort-local-scores
Fix local scores potentially not being stable-sorted for leaderboard display
This commit is contained in:
commit
90e5949e9f
@ -58,7 +58,10 @@ namespace osu.Game.Scoring
|
||||
/// <param name="scores">The array of <see cref="ScoreInfo"/>s to reorder.</param>
|
||||
/// <returns>The given <paramref name="scores"/> ordered by decreasing total score.</returns>
|
||||
public IEnumerable<ScoreInfo> OrderByTotalScore(IEnumerable<ScoreInfo> scores)
|
||||
=> scores.OrderByDescending(s => GetTotalScore(s)).ThenBy(s => s.OnlineID);
|
||||
=> scores.OrderByDescending(s => GetTotalScore(s))
|
||||
.ThenBy(s => s.OnlineID)
|
||||
// Local scores may not have an online ID. Fall back to date in these cases.
|
||||
.ThenBy(s => s.Date);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a bindable that represents the total score of a <see cref="ScoreInfo"/>.
|
||||
|
Loading…
Reference in New Issue
Block a user