Apply more cases/fix some existing ones

This commit is contained in:
smoogipoo
2019-05-07 13:23:09 +09:00
parent d7c09e7dbd
commit 13b9b04bb8
15 changed files with 25 additions and 9 deletions

View File

@ -107,6 +107,7 @@ namespace osu.Game.Overlays.Profile.Header
topLinkContainer.AddLink($@"{user.PostCount:#,##0} forum posts", $"https://osu.ppy.sh/users/{user.Id}/posts", creationParameters: embolden);
string websiteWithoutProtcol = user.Website;
if (!string.IsNullOrEmpty(websiteWithoutProtcol))
{
if (Uri.TryCreate(websiteWithoutProtcol, UriKind.Absolute, out var uri))

View File

@ -34,6 +34,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
content.Show();
iconContainer.Clear();
for (int i = 0; i < count; i++)
{
iconContainer.Add(new SpriteIcon

View File

@ -68,9 +68,11 @@ namespace osu.Game.Overlays.Profile.Header
{
var badges = user.Badges;
badgeFlowContainer.Clear();
if (badges?.Length > 0)
{
Show();
for (var index = 0; index < badges.Length; index++)
{
int displayIndex = index;

View File

@ -162,6 +162,7 @@ namespace osu.Game.Overlays.Profile.Header
titleText.Colour = OsuColour.FromHex(user?.Colour ?? "fff");
userStats.Clear();
if (user?.Statistics != null)
{
userStats.Add(new UserStatsLine("Ranked Score", user.Statistics.RankedScore.ToString("#,##0")));

View File

@ -135,7 +135,6 @@ namespace osu.Game.Overlays.Profile
}
private class ProfileHeaderTitle : ScreenTitle
{
public ProfileHeaderTitle()
{
@ -145,8 +144,9 @@ namespace osu.Game.Overlays.Profile
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AccentColour = colours.CommunityUserGreen;
}
}
}
}