From 4a4991e3485e48d4cebce979030390ef86b88e1b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 3 Jun 2025 20:13:36 +0900 Subject: [PATCH 1/2] Remove local manifestation of beatmap sets now that set items is always populated Since 4d33602. --- osu.Game/Screens/SelectV2/BeatmapCarousel.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs index 740ed14e1e..41b45df443 100644 --- a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs @@ -612,13 +612,6 @@ namespace osu.Game.Screens.SelectV2 // If set grouping is available, this is the fastest way to retrieve sets for randomisation. ICollection 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().Select(b => b.BeatmapSet!).Distinct().ToList(); - if (CurrentSelection is BeatmapInfo beatmapInfo) { randomSelectedBeatmaps.Add(beatmapInfo); From 367b6727cd0c8087070d0adf6ed32cfb8f16d5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 3 Jun 2025 15:14:56 +0200 Subject: [PATCH 2/2] Update one more inline comment --- osu.Game/Screens/SelectV2/BeatmapCarousel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs index 41b45df443..19333a97b5 100644 --- a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs @@ -609,7 +609,7 @@ 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 visibleSets = grouping.SetItems.Keys; if (CurrentSelection is BeatmapInfo beatmapInfo)