1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 14:12:55 +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 NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;

View File

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

View File

@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Bindables;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Beatmaps;
using osu.Game.Screens.Select.Filter;
@ -13,7 +12,7 @@ namespace osu.Game.Screens.Select.Carousel
{
public class CarouselBeatmapSet : CarouselGroupEagerSelect
{
private Func<IEnumerable<BeatmapInfo>, BeatmapInfo> getRecommendedBeatmap;
private readonly Func<IEnumerable<BeatmapInfo>, BeatmapInfo> getRecommendedBeatmap;
public IEnumerable<CarouselBeatmap> Beatmaps => InternalChildren.OfType<CarouselBeatmap>();
@ -38,7 +37,7 @@ namespace osu.Game.Screens.Select.Carousel
if (LastSelected == null)
{
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();

View File

@ -795,9 +795,9 @@ namespace osu.Game.Screens.Select
[Resolved]
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]
private void load()
@ -811,6 +811,7 @@ namespace osu.Game.Screens.Select
return;
if (api.LocalUser.Value is GuestUser)
return;
rulesets.AvailableRulesets.ForEach(rulesetInfo =>
{
var req = new GetUserRequest(api.LocalUser.Value.Id, rulesetInfo);