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

Simplify order by rank

This commit is contained in:
Andrei Zavatski 2020-03-17 02:03:57 +03:00
parent bd84980aa6
commit f816479ff8

View File

@ -235,7 +235,7 @@ namespace osu.Game.Overlays.Dashboard.Friends
return unsorted.OrderByDescending(u => u.LastVisit).ToList();
case UserSortCriteria.Rank:
return unsorted.Where(u => u.CurrentModeRank.HasValue).OrderBy(u => u.CurrentModeRank).Concat(unsorted.Where(u => u.CurrentModeRank == null)).ToList();
return unsorted.OrderByDescending(u => u.CurrentModeRank.HasValue).ThenBy(u => u.CurrentModeRank ?? 0).ToList();
case UserSortCriteria.Username:
return unsorted.OrderBy(u => u.Username).ToList();