mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 02:47:19 +08:00
Simplify CommentsPage.onCommentRepliesReceived
This commit is contained in:
parent
b0db155565
commit
483bbac6fd
@ -126,16 +126,8 @@ namespace osu.Game.Overlays.Comments
|
||||
|
||||
private void onCommentRepliesReceived(CommentBundle response, DrawableComment drawableComment)
|
||||
{
|
||||
var receivedComments = response.Comments;
|
||||
|
||||
var uniqueComments = new List<Comment>();
|
||||
|
||||
// We may receive already loaded comments
|
||||
receivedComments.ForEach(c =>
|
||||
{
|
||||
if (!drawableComment.ContainsReply(c.Id))
|
||||
uniqueComments.Add(c);
|
||||
});
|
||||
var uniqueComments = response.Comments.Where(c => !drawableComment.ContainsReply(c.Id)).ToList();
|
||||
|
||||
uniqueComments.ForEach(c => c.ParentComment = drawableComment.Comment);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user