1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Merge pull request #11083 from LittleEndu/recommend-if-filtered

Select recommended beatmap if last selection is filtered
This commit is contained in:
Dean Herbert 2020-12-04 13:22:34 +09:00 committed by GitHub
commit 48c42e4247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ namespace osu.Game.Screens.Select.Carousel
protected override CarouselItem GetNextToSelect()
{
if (LastSelected == null)
if (LastSelected == null || LastSelected.Filtered.Value)
{
if (GetRecommendedBeatmap?.Invoke(Children.OfType<CarouselBeatmap>().Where(b => !b.Filtered.Value).Select(b => b.Beatmap)) is BeatmapInfo recommended)
return Children.OfType<CarouselBeatmap>().First(b => b.Beatmap == recommended);