diff --git a/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs b/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs
index f9f7f3e89c..da339bbc3e 100644
--- a/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs
+++ b/osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselTestScene.cs
@@ -356,7 +356,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
""");
createHeader("carousel");
stats.AddParagraph($"""
- sorting: {Carousel.IsFiltering}
+ filtering: {Carousel.IsFiltering} (total {Carousel.FilterCount} times)
tracked: {Carousel.ItemsTracked}
displayable: {Carousel.DisplayableItems}
displayed: {Carousel.VisibleItems}
diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs
index b81484d3da..dcd745395b 100644
--- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs
+++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs
@@ -78,6 +78,15 @@ namespace osu.Game.Tests.Visual.SongSelectV2
AddUntilStep("wait for results screen", () => Stack.CurrentScreen is ResultsScreen);
}
+ [Test]
+ public void TestSingleFilterWhenEntering()
+ {
+ ImportBeatmapForRuleset(0);
+ LoadSongSelect();
+
+ AddAssert("single filter", () => Carousel.FilterCount, () => Is.EqualTo(1));
+ }
+
[Test]
public void TestCookieDoesNothingIfNothingSelected()
{
diff --git a/osu.Game/Graphics/Carousel/Carousel.cs b/osu.Game/Graphics/Carousel/Carousel.cs
index 9da4d0e187..ce5d015775 100644
--- a/osu.Game/Graphics/Carousel/Carousel.cs
+++ b/osu.Game/Graphics/Carousel/Carousel.cs
@@ -71,6 +71,11 @@ namespace osu.Game.Graphics.Carousel
///
public bool IsFiltering => !filterTask.IsCompleted;
+ ///
+ /// The number of times filter operations have been triggered.
+ ///
+ internal int FilterCount { get; private set; }
+
///
/// The number of displayable items currently being tracked (before filtering).
///
@@ -187,6 +192,8 @@ namespace osu.Game.Graphics.Carousel
/// Whether all existing drawable panels should be reset post filter.
protected virtual Task> FilterAsync(bool clearExistingPanels = false)
{
+ FilterCount++;
+
if (clearExistingPanels)
filterReusesPanels.Invalidate();