Merge pull request #19210 from peppy/non-null-ended-at

Make `SoloScoreInfo.EndedAt` non-null
This commit is contained in:
Dean Herbert 2022-07-18 15:42:33 +09:00 committed by GitHub
commit e8b57379b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ public class SoloScoreInfo : IHasOnlineID<long>
public DateTimeOffset? StartedAt { get; set; } public DateTimeOffset? StartedAt { get; set; }
[JsonProperty("ended_at")] [JsonProperty("ended_at")]
public DateTimeOffset? EndedAt { get; set; } public DateTimeOffset EndedAt { get; set; }
[JsonProperty("mods")] [JsonProperty("mods")]
public APIMod[] Mods { get; set; } = Array.Empty<APIMod>(); public APIMod[] Mods { get; set; } = Array.Empty<APIMod>();
@ -128,7 +128,7 @@ public ScoreInfo ToScoreInfo(RulesetStore rulesets, BeatmapInfo? beatmap = null)
MaxCombo = MaxCombo, MaxCombo = MaxCombo,
Rank = Rank, Rank = Rank,
Statistics = Statistics, Statistics = Statistics,
Date = EndedAt ?? DateTimeOffset.Now, Date = EndedAt,
Hash = HasReplay ? "online" : string.Empty, // TODO: temporary? Hash = HasReplay ? "online" : string.Empty, // TODO: temporary?
Mods = mods, Mods = mods,
PP = PP, PP = PP,