1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 16:07:24 +08:00

Merge pull request #24235 from AkiSakurai/toplocalrank

Compute the top local rank directly without an expensive detach call
This commit is contained in:
Dean Herbert 2023-07-16 12:14:56 +09:00 committed by GitHub
commit 2d51aa21b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,8 +75,7 @@ namespace osu.Game.Screens.Select.Carousel
if (changes?.HasCollectionChanges() == false)
return;
ScoreInfo? topScore = sender.Detach().OrderByTotalScore().FirstOrDefault();
ScoreInfo? topScore = sender.MaxBy(info => (info.TotalScore, -info.Date.UtcDateTime.Ticks));
updateable.Rank = topScore?.Rank;
updateable.Alpha = topScore != null ? 1 : 0;
}