1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Simplify order by last visit

This commit is contained in:
Andrei Zavatski 2020-03-17 01:56:10 +03:00
parent da97a02e66
commit bd84980aa6

View File

@ -232,7 +232,7 @@ namespace osu.Game.Overlays.Dashboard.Friends
{ {
default: default:
case UserSortCriteria.LastVisit: case UserSortCriteria.LastVisit:
return unsorted.OrderBy(u => u.LastVisit).Reverse().ToList(); return unsorted.OrderByDescending(u => u.LastVisit).ToList();
case UserSortCriteria.Rank: case UserSortCriteria.Rank:
return unsorted.Where(u => u.CurrentModeRank.HasValue).OrderBy(u => u.CurrentModeRank).Concat(unsorted.Where(u => u.CurrentModeRank == null)).ToList(); return unsorted.Where(u => u.CurrentModeRank.HasValue).OrderBy(u => u.CurrentModeRank).Concat(unsorted.Where(u => u.CurrentModeRank == null)).ToList();