mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +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:
commit
2d51aa21b7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user