remove some redundant stuff

This commit is contained in:
Jorolf 2017-09-21 22:15:42 +02:00
parent 72141935e8
commit 14b8e9fd77
2 changed files with 4 additions and 19 deletions

View File

@ -8,15 +8,14 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Rulesets.Scoring;
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Users;
using osu.Game.Graphics.UserInterface;
using OpenTK;
using osu.Framework.Allocation;
namespace osu.Game.Overlays.Profile.Sections
{
@ -28,9 +27,6 @@ namespace osu.Game.Overlays.Profile.Sections
private readonly ScoreContainer best, first;
private APIAccess api;
private RulesetStore rulesets;
public RanksSection()
{
Children = new Drawable[]
@ -40,13 +36,6 @@ namespace osu.Game.Overlays.Profile.Sections
};
}
[BackgroundDependencyLoader]
private void load(APIAccess api, RulesetStore rulesets)
{
this.api = api;
this.rulesets = rulesets;
}
public override User User
{
get
@ -69,7 +58,7 @@ namespace osu.Game.Overlays.Profile.Sections
private readonly OsuHoverContainer showMoreButton;
private readonly LoadingAnimation showMoreLoading;
private ScoreType type;
private readonly ScoreType type;
private int visiblePages;
private User user;
private readonly bool includeWeigth;
@ -166,7 +155,7 @@ namespace osu.Game.Overlays.Profile.Sections
if (scores.Any())
{
missing.Hide();
foreach (Score score in scores)
foreach (OnlineScore score in scores)
scoreContainer.Add(new DrawableScore(score, includeWeigth ? Math.Pow(0.95, scoreContainer.Count) : -1)
{
RelativeSizeAxes = Axes.X,

View File

@ -4,13 +4,9 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Overlays.Profile.Sections;
using osu.Game.Overlays.Profile.Sections.Ranks;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Users;
using System;
using System.Collections.Generic;
@ -21,7 +17,7 @@ namespace osu.Game.Tests.Visual
{
public override string Description => "showing your latest achievements";
public override IReadOnlyList<Type> RequiredTypes => new Type[] { typeof(DrawableScore), typeof(RanksSection) };
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(DrawableScore), typeof(RanksSection) };
public TestCaseUserRanks()
{