1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 14:24:18 +08:00

Merge pull request #33404 from peppy/song-select-v2-remove-dead-code

Remove local manifestation of beatmap sets now that set items is always populated
This commit is contained in:
Bartłomiej Dach
2025-06-04 07:40:38 +02:00
committed by GitHub
Unverified
+1 -8
View File
@@ -609,16 +609,9 @@ namespace osu.Game.Screens.SelectV2
if (carouselItems?.Any() != true)
return false;
// If set grouping is available, this is the fastest way to retrieve sets for randomisation.
// This is the fastest way to retrieve sets for randomisation.
ICollection<BeatmapSetInfo> visibleSets = grouping.SetItems.Keys;
// If not, we need to do an expensive copy.
//
// There's probably a more efficient way to handle this. Maybe the grouping filter should always expose grouped sets regardless
// as that process is done asynchronously.
if (!visibleSets.Any())
visibleSets = carouselItems.Select(i => i.Model).OfType<BeatmapInfo>().Select(b => b.BeatmapSet!).Distinct().ToList();
if (CurrentSelection is BeatmapInfo beatmapInfo)
{
randomSelectedBeatmaps.Add(beatmapInfo);