1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 23:15:14 +08:00

Style changes

This commit is contained in:
Endrik Tombak 2020-04-09 18:59:18 +03:00
parent caa404f8fa
commit 35f97dfc75
4 changed files with 5 additions and 8 deletions

View File

@ -8,7 +8,6 @@ using System.Linq;
using System.Text; using System.Text;
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions; using osu.Framework.Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;

View File

@ -23,9 +23,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Cursor;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
using osu.Game.Screens.Select.Carousel; using osu.Game.Screens.Select.Carousel;
using osu.Game.Online.API;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Online.API.Requests;
namespace osu.Game.Screens.Select namespace osu.Game.Screens.Select
{ {

View File

@ -4,7 +4,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Screens.Select.Filter; using osu.Game.Screens.Select.Filter;
@ -13,7 +12,7 @@ namespace osu.Game.Screens.Select.Carousel
{ {
public class CarouselBeatmapSet : CarouselGroupEagerSelect public class CarouselBeatmapSet : CarouselGroupEagerSelect
{ {
private Func<IEnumerable<BeatmapInfo>, BeatmapInfo> getRecommendedBeatmap; private readonly Func<IEnumerable<BeatmapInfo>, BeatmapInfo> getRecommendedBeatmap;
public IEnumerable<CarouselBeatmap> Beatmaps => InternalChildren.OfType<CarouselBeatmap>(); public IEnumerable<CarouselBeatmap> Beatmaps => InternalChildren.OfType<CarouselBeatmap>();
@ -38,7 +37,7 @@ namespace osu.Game.Screens.Select.Carousel
if (LastSelected == null) if (LastSelected == null)
{ {
var recommendedBeatmapInfo = getRecommendedBeatmap(Children.OfType<CarouselBeatmap>().Where(b => !b.Filtered.Value).Select(b => b.Beatmap)); var recommendedBeatmapInfo = getRecommendedBeatmap(Children.OfType<CarouselBeatmap>().Where(b => !b.Filtered.Value).Select(b => b.Beatmap));
return Children.OfType<CarouselBeatmap>().Where(b => b.Beatmap == recommendedBeatmapInfo).First(); return Children.OfType<CarouselBeatmap>().First(b => b.Beatmap == recommendedBeatmapInfo);
} }
return base.GetNextToSelect(); return base.GetNextToSelect();

View File

@ -795,9 +795,9 @@ namespace osu.Game.Screens.Select
[Resolved] [Resolved]
private RulesetStore rulesets { get; set; } private RulesetStore rulesets { get; set; }
private Dictionary<RulesetInfo, double> recommendedStarDifficulty = new Dictionary<RulesetInfo, double>(); private readonly Dictionary<RulesetInfo, double> recommendedStarDifficulty = new Dictionary<RulesetInfo, double>();
private int pendingAPIRequests = 0; private int pendingAPIRequests;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
@ -811,6 +811,7 @@ namespace osu.Game.Screens.Select
return; return;
if (api.LocalUser.Value is GuestUser) if (api.LocalUser.Value is GuestUser)
return; return;
rulesets.AvailableRulesets.ForEach(rulesetInfo => rulesets.AvailableRulesets.ForEach(rulesetInfo =>
{ {
var req = new GetUserRequest(api.LocalUser.Value.Id, rulesetInfo); var req = new GetUserRequest(api.LocalUser.Value.Id, rulesetInfo);