1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 00:12:59 +08:00

Fix potential incorrect ordering

This commit is contained in:
smoogipoo 2021-08-30 19:41:44 +09:00
parent 4ebb11472d
commit e19d81c88c
2 changed files with 10 additions and 2 deletions

View File

@ -261,6 +261,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
var scoreInfos = newScores.Scores.Select(s => s.CreateScoreInfo(rulesets))
.OrderByDescending(s => scoreManager.GetTotalScore(s))
.ThenBy(s => s.OnlineScoreID)
.ToList();
var topScore = scoreInfos.First();

View File

@ -146,7 +146,10 @@ namespace osu.Game.Screens.Select.Leaderboards
scores = scores.Where(s => s.Mods.Any(m => selectedMods.Contains(m.Acronym)));
}
Scores = scores.OrderByDescending(s => scoreManager.GetTotalScore(s)).ToArray();
Scores = scores.OrderByDescending(s => scoreManager.GetTotalScore(s))
.ThenBy(s => s.OnlineScoreID)
.ToArray();
PlaceholderState = Scores.Any() ? PlaceholderState.Successful : PlaceholderState.NoScores;
return null;
@ -182,7 +185,11 @@ namespace osu.Game.Screens.Select.Leaderboards
req.Success += r =>
{
scoresCallback?.Invoke(r.Scores.Select(s => s.CreateScoreInfo(rulesets)).OrderByDescending(s => scoreManager.GetTotalScore(s)));
scoresCallback?.Invoke(
r.Scores.Select(s => s.CreateScoreInfo(rulesets))
.OrderByDescending(s => scoreManager.GetTotalScore(s))
.ThenBy(s => s.OnlineScoreID));
TopScore = r.UserScore?.CreateScoreInfo(rulesets);
};