Fix incorrect ordering and grouping of difficulties at song select

This commit is contained in:
Dean Herbert 2022-01-07 22:57:22 +09:00
parent aaefd72c69
commit 6919df18fa
2 changed files with 4 additions and 1 deletions

View File

@ -39,6 +39,8 @@ public CarouselBeatmapSet(BeatmapSetInfo beatmapSet)
beatmapSet.Beatmaps
.Where(b => !b.Hidden)
.OrderBy(b => b.RulesetID)
.ThenBy(b => b.StarRating)
.Select(b => new CarouselBeatmap(b))
.ForEach(AddChild);
}

View File

@ -87,7 +87,8 @@ private IEnumerable<DifficultyIcon> getDifficultyIcons()
var beatmaps = carouselSet.Beatmaps.ToList();
return beatmaps.Count > maximum_difficulty_icons
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.BeatmapInfo.Ruleset).Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Key))
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.BeatmapInfo.RulesetID)
.Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Last().BeatmapInfo.Ruleset))
: beatmaps.Select(b => new FilterableDifficultyIcon(b));
}
}