mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 14:12:55 +08:00
Style changes
This commit is contained in:
parent
caa404f8fa
commit
35f97dfc75
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user