Move recommender to field construction

This commit is contained in:
Dean Herbert 2020-04-30 21:01:53 +09:00
parent cf4e79cf38
commit 000c34dc26

View File

@ -78,7 +78,7 @@ namespace osu.Game.Screens.Select
protected BeatmapCarousel Carousel { get; private set; } protected BeatmapCarousel Carousel { get; private set; }
private DifficultyRecommender recommender; private readonly DifficultyRecommender recommender = new DifficultyRecommender();
private BeatmapInfoWedge beatmapInfoWedge; private BeatmapInfoWedge beatmapInfoWedge;
private DialogOverlay dialogOverlay; private DialogOverlay dialogOverlay;
@ -118,7 +118,7 @@ namespace osu.Game.Screens.Select
BleedBottom = Footer.HEIGHT, BleedBottom = Footer.HEIGHT,
SelectionChanged = updateSelectedBeatmap, SelectionChanged = updateSelectedBeatmap,
BeatmapSetsChanged = carouselBeatmapsLoaded, BeatmapSetsChanged = carouselBeatmapsLoaded,
GetRecommendedBeatmap = (recommender = new DifficultyRecommender()).GetRecommendedBeatmap, GetRecommendedBeatmap = recommender.GetRecommendedBeatmap,
}, c => carouselContainer.Child = c); }, c => carouselContainer.Child = c);
AddRangeInternal(new Drawable[] AddRangeInternal(new Drawable[]