DrawableJoinDate handles "Here since the beginning" text

This commit is contained in:
HoutarouOreki 2018-06-15 14:28:49 +02:00
parent f0fbc04d92
commit d122547c1e
2 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,9 @@ namespace osu.Game.Graphics
this.date = date;
}
protected override string Format() => Text = string.Format($"{date:MMMM yyyy}");
protected override string Format() => Text = date.ToUniversalTime().Year < 2008 ?
"Here since the beginning" :
string.Format($"{date:MMMM yyyy}");
public override string TooltipText => string.Format($"{date:MMMM d, yyyy}");
}

View File

@ -357,16 +357,13 @@ namespace osu.Game.Overlays.Profile
infoTextLeft.NewParagraph();
if (user.JoinDate.ToUniversalTime().Year < 2008)
{
infoTextLeft.AddText("Here since the beginning", boldItalic);
}
else
if (user.JoinDate.ToUniversalTime().Year >= 2008)
{
infoTextLeft.AddText("Joined ", lightText);
infoTextLeft.AddText(new DrawableJoinDate(user.JoinDate), boldItalic);
}
infoTextLeft.AddText(new DrawableJoinDate(user.JoinDate), boldItalic);
infoTextLeft.NewLine();
infoTextLeft.AddText("Last seen ", lightText);
infoTextLeft.AddText(new DrawableDate(user.LastVisit), boldItalic);