Parse voted comments

This commit is contained in:
Andrei Zavatski
2019-10-17 12:35:12 +03:00
parent a1bb061405
commit 38dcd42d08
3 changed files with 40 additions and 6 deletions

View File

@ -47,6 +47,26 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"included_comments")]
public List<Comment> IncludedComments { get; set; }
private List<long> userVotes;
[JsonProperty(@"user_votes")]
public List<long> UserVotes
{
get => userVotes;
set
{
userVotes = value;
value.ForEach(v =>
{
Comments.ForEach(c =>
{
if (v == c.Id)
c.IsVoted = true;
});
});
}
}
private List<User> users;
[JsonProperty(@"users")]