Remove unnecessary carousel variable, fix code formatting

This commit is contained in:
voidedWarranties
2020-02-12 20:11:39 -08:00
parent b126c00292
commit f8b69fe632

View File

@ -123,7 +123,7 @@ namespace osu.Game.Screens.Select.Carousel
return beatmaps.Count > maximum_difficulty_icons return beatmaps.Count > maximum_difficulty_icons
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.Beatmap.Ruleset).Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Key)) ? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.Beatmap.Ruleset).Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Key))
: beatmaps.Select(b => new FilterableDifficultyIcon(b, songSelect, songSelect.Carousel)); : beatmaps.Select(b => new FilterableDifficultyIcon(b, songSelect));
} }
public MenuItem[] ContextMenuItems public MenuItem[] ContextMenuItems
@ -216,11 +216,10 @@ namespace osu.Game.Screens.Select.Carousel
{ {
private readonly BindableBool filtered = new BindableBool(); private readonly BindableBool filtered = new BindableBool();
private SongSelect songSelect; private readonly SongSelect songSelect;
private BeatmapCarousel carousel; private readonly BeatmapInfo info;
private BeatmapInfo info;
public FilterableDifficultyIcon(CarouselBeatmap item, SongSelect songSelect, BeatmapCarousel carousel) public FilterableDifficultyIcon(CarouselBeatmap item, SongSelect songSelect)
: base(item.Beatmap) : base(item.Beatmap)
{ {
filtered.BindTo(item.Filtered); filtered.BindTo(item.Filtered);
@ -228,7 +227,6 @@ namespace osu.Game.Screens.Select.Carousel
filtered.TriggerChange(); filtered.TriggerChange();
this.songSelect = songSelect; this.songSelect = songSelect;
this.carousel = carousel;
info = item.Beatmap; info = item.Beatmap;
} }
@ -236,7 +234,7 @@ namespace osu.Game.Screens.Select.Carousel
{ {
if (!filtered.Value) if (!filtered.Value)
{ {
carousel?.SelectBeatmap(info); songSelect?.Carousel.SelectBeatmap(info);
if (e.AltPressed) if (e.AltPressed)
songSelect?.FinaliseSelection(); songSelect?.FinaliseSelection();