mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Implement DeletedChildsPlaceholder component
This commit is contained in:
@ -5,6 +5,7 @@ using Newtonsoft.Json;
|
||||
using osu.Game.Users;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
@ -91,5 +92,22 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
return IsDeleted ? @"deleted" : MessageHTML.Replace("<div class='osu-md-default'>", "").Replace("<p class=\"osu-md-default__paragraph\">", "").Replace("<br />", "").Replace("</p>", "").Replace("</div>", "").Replace(""", "\"");
|
||||
}
|
||||
|
||||
public int GetDeletedChildsCount()
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if (ChildComments.Any())
|
||||
ChildComments.ForEach(child =>
|
||||
{
|
||||
if (child.IsDeleted)
|
||||
count++;
|
||||
});
|
||||
|
||||
if (IsDeleted)
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user