1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:42:58 +08:00

Use TakeWhile instead of reversing the list.

This commit is contained in:
smoogipooo 2017-09-04 11:28:15 +09:00
parent 9078444a62
commit 9b0309e683

View File

@ -59,8 +59,8 @@ namespace osu.Game.Overlays.Music
{
get
{
var available = items.Children.Reverse();
return (available.SkipWhile(i => !i.Selected).Skip(1).FirstOrDefault() ?? available.FirstOrDefault())?.BeatmapSetInfo;
var available = items.Children;
return (available.TakeWhile(i => !i.Selected).LastOrDefault() ?? available.LastOrDefault())?.BeatmapSetInfo;
}
}