mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Merge branch 'master' into update-issue
This commit is contained in:
commit
78ed8448e6
@ -58,6 +58,12 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
checkSupporterTag(false);
|
||||
|
||||
AddStep("Show null dummy", () => profile.ShowUser(new User
|
||||
{
|
||||
Username = @"Null",
|
||||
Id = 1,
|
||||
}, false));
|
||||
|
||||
AddStep("Show ppy", () => profile.ShowUser(new User
|
||||
{
|
||||
Username = @"peppy",
|
||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Overlays.Profile
|
||||
{
|
||||
placeholder.FadeIn(fade_duration, Easing.Out);
|
||||
|
||||
if (user == null)
|
||||
if (user?.Statistics?.Ranks.Global == null)
|
||||
{
|
||||
rankText.Text = string.Empty;
|
||||
performanceText.Text = string.Empty;
|
||||
@ -105,7 +105,7 @@ namespace osu.Game.Overlays.Profile
|
||||
return;
|
||||
}
|
||||
|
||||
int[] userRanks = user.RankHistory?.Data ?? new[] { user.Statistics.Ranks.Global };
|
||||
int[] userRanks = user.RankHistory?.Data ?? new[] { user.Statistics.Ranks.Global.Value };
|
||||
ranks = userRanks.Select((x, index) => new KeyValuePair<int, int>(index, x)).Where(x => x.Value != 0).ToArray();
|
||||
|
||||
if (ranks.Length > 1)
|
||||
|
@ -169,15 +169,18 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
Header.User = user;
|
||||
|
||||
foreach (string id in user.ProfileOrder)
|
||||
if (user.ProfileOrder != null)
|
||||
{
|
||||
var sec = sections.FirstOrDefault(s => s.Identifier == id);
|
||||
if (sec != null)
|
||||
foreach (string id in user.ProfileOrder)
|
||||
{
|
||||
sec.User.Value = user;
|
||||
var sec = sections.FirstOrDefault(s => s.Identifier == id);
|
||||
if (sec != null)
|
||||
{
|
||||
sec.User.Value = user;
|
||||
|
||||
sectionsContainer.Add(sec);
|
||||
tabs.AddItem(sec);
|
||||
sectionsContainer.Add(sec);
|
||||
tabs.AddItem(sec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,10 +73,10 @@ namespace osu.Game.Users
|
||||
public struct UserRanks
|
||||
{
|
||||
[JsonProperty(@"global")]
|
||||
public int Global;
|
||||
public int? Global;
|
||||
|
||||
[JsonProperty(@"country")]
|
||||
public int Country;
|
||||
public int? Country;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user