mirror of https://github.com/ppy/osu
Fix last visit not supporting null values
Can now be null if a user chooses to hide their online status
This commit is contained in:
parent
a4c4622070
commit
716eee9a5c
|
@ -386,10 +386,13 @@ private void loadUser()
|
||||||
infoTextLeft.AddText(new DrawableJoinDate(user.JoinDate), boldItalic);
|
infoTextLeft.AddText(new DrawableJoinDate(user.JoinDate), boldItalic);
|
||||||
}
|
}
|
||||||
|
|
||||||
infoTextLeft.NewLine();
|
if (user.LastVisit.HasValue)
|
||||||
infoTextLeft.AddText("Last seen ", lightText);
|
{
|
||||||
infoTextLeft.AddText(new DrawableDate(user.LastVisit), boldItalic);
|
infoTextLeft.NewLine();
|
||||||
infoTextLeft.NewParagraph();
|
infoTextLeft.AddText("Last seen ", lightText);
|
||||||
|
infoTextLeft.AddText(new DrawableDate(user.LastVisit.Value), boldItalic);
|
||||||
|
infoTextLeft.NewParagraph();
|
||||||
|
}
|
||||||
|
|
||||||
if (user.PlayStyle?.Length > 0)
|
if (user.PlayStyle?.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class UserCover
|
||||||
public string Location;
|
public string Location;
|
||||||
|
|
||||||
[JsonProperty(@"last_visit")]
|
[JsonProperty(@"last_visit")]
|
||||||
public DateTimeOffset LastVisit;
|
public DateTimeOffset? LastVisit;
|
||||||
|
|
||||||
[JsonProperty(@"twitter")]
|
[JsonProperty(@"twitter")]
|
||||||
public string Twitter;
|
public string Twitter;
|
||||||
|
|
Loading…
Reference in New Issue