diff --git a/osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs b/osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs index 1dc880ea90..f932b01d2c 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseUserProfile.cs @@ -1,8 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; using osu.Framework.Testing; using osu.Game.Overlays; using osu.Game.Users; diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 3ea4d66008..5fbbd531ce 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -378,6 +378,9 @@ namespace osu.Game.Overlays.Profile gradeA.Count = user.Statistics.GradesCount.A; gradeA.Show(); + gradeSPlus.Count = 0; + gradeSSPlus.Count = 0; + chartContainer.Add(new RankChart(user) { RelativeSizeAxes = Axes.Both }); } } diff --git a/osu.Game/Overlays/Profile/ProfileSection.cs b/osu.Game/Overlays/Profile/ProfileSection.cs index dfefe7fba1..84668d8675 100644 --- a/osu.Game/Overlays/Profile/ProfileSection.cs +++ b/osu.Game/Overlays/Profile/ProfileSection.cs @@ -7,7 +7,6 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; -using osu.Game.Overlays; namespace osu.Game.Overlays.Profile { diff --git a/osu.Game/Overlays/Profile/RankChart.cs b/osu.Game/Overlays/Profile/RankChart.cs index 26fba0dba5..dc28ec1ffd 100644 --- a/osu.Game/Overlays/Profile/RankChart.cs +++ b/osu.Game/Overlays/Profile/RankChart.cs @@ -22,8 +22,8 @@ namespace osu.Game.Overlays.Profile private readonly SpriteText rankText, performanceText, relativeText; private readonly RankChartLineGraph graph; - private int[] ranks; - private decimal?[] performances; + private readonly int[] ranks; + private readonly decimal?[] performances; private const float primary_textsize = 25, secondary_textsize = 13, padding = 10; @@ -70,7 +70,7 @@ namespace osu.Game.Overlays.Profile } }; ranks = new[] { user.Statistics.Rank }; - performances = new decimal?[] { user.Statistics.PP }; + performances = new [] { user.Statistics.PP }; } private void updateRankTexts() @@ -78,13 +78,14 @@ namespace osu.Game.Overlays.Profile rankText.Text = user.Statistics.Rank > 0 ? $"#{user.Statistics.Rank:#,0}" : "no rank"; performanceText.Text = user.Statistics.PP != null ? $"{user.Statistics.PP:#,0}pp" : string.Empty; //relativeText.Text = $"{user.Country?.FullName} #{countryRank:#,0}"; + relativeText.Text = string.Empty; } private void showHistoryRankTexts(int dayIndex) { rankText.Text = ranks[dayIndex] > 0 ? $"#{ranks[dayIndex]:#,0}" : "no rank"; performanceText.Text = performances[dayIndex] != null ? $"{performances[dayIndex]:#,0}pp" : string.Empty; - //relativeText.Text = dayIndex == ranks.Length ? "Now" : $"{ranks.Length - dayIndex} days ago"; + relativeText.Text = dayIndex == ranks.Length ? "Now" : $"{ranks.Length - dayIndex} days ago"; //plural should be handled in a general way }