From d81cabc06361ab9cfb20f7294c38166d4bdb03a9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 18 Dec 2023 22:35:36 +0900 Subject: [PATCH] Revert "Improve performance of `attemptSelection` using new cached count and `LastSelected`" This reverts commit 25df42630ecba979457a9dcd2a7678d154a85a5e. --- osu.Game/Screens/Select/Carousel/CarouselGroupEagerSelect.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/Carousel/CarouselGroupEagerSelect.cs b/osu.Game/Screens/Select/Carousel/CarouselGroupEagerSelect.cs index 8d2ddc5812..7f90e05744 100644 --- a/osu.Game/Screens/Select/Carousel/CarouselGroupEagerSelect.cs +++ b/osu.Game/Screens/Select/Carousel/CarouselGroupEagerSelect.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace osu.Game.Screens.Select.Carousel { @@ -100,7 +101,7 @@ namespace osu.Game.Screens.Select.Carousel if (State.Value != CarouselItemState.Selected) return; // we only perform eager selection if none of our items are in a selected state already. - if (LastSelected?.State.Value == CarouselItemState.Selected || TotalItemsNotFiltered == 0) return; + if (Items.Any(i => i.State.Value == CarouselItemState.Selected)) return; PerformSelection(); }