diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs
index a807fc6a34..c474b36a89 100644
--- a/osu.Game/Screens/Select/BeatmapCarousel.cs
+++ b/osu.Game/Screens/Select/BeatmapCarousel.cs
@@ -28,6 +28,7 @@ using osu.Game.Extensions;
using osu.Game.Graphics.Containers;
using osu.Game.Input.Bindings;
using osu.Game.Screens.Select.Carousel;
+using osu.Game.Screens.Select.Filter;
using osuTK;
using osuTK.Input;
@@ -123,7 +124,7 @@ namespace osu.Game.Screens.Select
private void loadNewRoot()
{
- beatmapsSplitOut = activeCriteria.SplitOutDifficulties;
+ beatmapsSplitOut = activeCriteria.Sort == SortMode.Difficulty;
// Ensure no changes are made to the list while we are initialising items.
// We'll catch up on changes via subscriptions anyway.
@@ -656,7 +657,7 @@ namespace osu.Game.Screens.Select
{
PendingFilter = null;
- if (activeCriteria.SplitOutDifficulties != beatmapsSplitOut)
+ if ((activeCriteria.Sort == SortMode.Difficulty) != beatmapsSplitOut)
{
loadNewRoot();
return;
diff --git a/osu.Game/Screens/Select/FilterCriteria.cs b/osu.Game/Screens/Select/FilterCriteria.cs
index 15cb3c5104..cc8a92c7c7 100644
--- a/osu.Game/Screens/Select/FilterCriteria.cs
+++ b/osu.Game/Screens/Select/FilterCriteria.cs
@@ -20,11 +20,6 @@ namespace osu.Game.Screens.Select
public GroupMode Group;
public SortMode Sort;
- ///
- /// Whether the display of beatmap sets should be split apart per-difficulty for the current criteria.
- ///
- public bool SplitOutDifficulties => Sort == SortMode.Difficulty;
-
public BeatmapSetInfo? SelectedBeatmapSet;
public OptionalRange StarDifficulty;
diff --git a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs
index e7a410130a..e007ae54ce 100644
--- a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs
+++ b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs
@@ -471,16 +471,9 @@ namespace osu.Game.Screens.SelectV2
private ScheduledDelegate? loadingDebounce;
- ///
- /// We need to track this state locally since `FilterCriteria` is passed by reference and not accurate.
- /// It should really be a struct.
- ///
- private bool splitOutDifficulties;
-
public void Filter(FilterCriteria criteria)
{
- bool resetDisplay = criteria.SplitOutDifficulties != splitOutDifficulties;
- splitOutDifficulties = criteria.SplitOutDifficulties;
+ bool resetDisplay = grouping.BeatmapSetsGroupedTogether != BeatmapCarouselFilterGrouping.ShouldGroupBeatmapsTogether(criteria);
Criteria = criteria;
diff --git a/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs b/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs
index f35169e76b..86256ad99e 100644
--- a/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs
+++ b/osu.Game/Screens/SelectV2/BeatmapCarouselFilterGrouping.cs
@@ -48,7 +48,7 @@ namespace osu.Game.Screens.SelectV2
var criteria = getCriteria();
var newItems = new List();
- BeatmapSetsGroupedTogether = criteria.Sort != SortMode.Difficulty && criteria.Group != GroupMode.Difficulty;
+ BeatmapSetsGroupedTogether = ShouldGroupBeatmapsTogether(criteria);
var groups = getGroups((List)items, criteria);
@@ -122,6 +122,11 @@ namespace osu.Game.Screens.SelectV2
}, cancellationToken).ConfigureAwait(false);
}
+ public static bool ShouldGroupBeatmapsTogether(FilterCriteria criteria)
+ {
+ return criteria.Sort != SortMode.Difficulty && criteria.Group != GroupMode.Difficulty;
+ }
+
private List getGroups(List items, FilterCriteria criteria)
{
switch (criteria.Group)