1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 17:17:19 +08:00

Simplify CommentsPage.onCommentRepliesReceived

This commit is contained in:
Andrei Zavatski 2020-02-13 03:13:56 +03:00
parent b0db155565
commit 483bbac6fd

View File

@ -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);