mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Add IsDeleted property
This commit is contained in:
parent
aa8df0fa20
commit
cc6bf2f173
@ -20,7 +20,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
set
|
||||
{
|
||||
parentId = value;
|
||||
IsTopLevel = value != null;
|
||||
IsTopLevel = value == null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,8 +54,18 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"updated_at")]
|
||||
public DateTimeOffset? UpdatedAt { get; set; }
|
||||
|
||||
private DateTimeOffset? deletedAt;
|
||||
|
||||
[JsonProperty(@"deleted_at")]
|
||||
public DateTimeOffset? DeletedAt { get; set; }
|
||||
public DateTimeOffset? DeletedAt
|
||||
{
|
||||
get => deletedAt;
|
||||
set
|
||||
{
|
||||
deletedAt = value;
|
||||
IsDeleted = value != null;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty(@"edited_at")]
|
||||
public DateTimeOffset? EditedAt { get; set; }
|
||||
@ -64,5 +74,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public long? EditedById { get; set; }
|
||||
|
||||
public bool IsTopLevel { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ namespace osu.Game.Overlays
|
||||
|
||||
private GetCommentsRequest request;
|
||||
|
||||
private readonly CommentsHeader header;
|
||||
private readonly Box background;
|
||||
private readonly FillFlowContainer content;
|
||||
|
||||
@ -54,7 +53,7 @@ namespace osu.Game.Overlays
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
header = new CommentsHeader
|
||||
new CommentsHeader
|
||||
{
|
||||
Sort = { BindTarget = Sort }
|
||||
},
|
||||
@ -91,7 +90,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
foreach (var c in response.Comments)
|
||||
{
|
||||
createDrawableComment(c);
|
||||
if (!c.IsDeleted)
|
||||
createDrawableComment(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user