Make replies addition more consistent

This commit is contained in:
Andrei Zavatski
2020-02-13 02:47:13 +03:00
parent c6f8e157fd
commit b0db155565
2 changed files with 9 additions and 13 deletions

View File

@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Comments
}
// No need to find parent for top-level comment
if (comment.IsTopLevel)
if (!comment.ParentId.HasValue)
continue;
if (nodeDictionary.ContainsKey(comment.ParentId.Value))
@ -112,7 +112,7 @@ namespace osu.Game.Overlays.Comments
var replies = comment.ChildComments;
if (replies.Any())
drawableComment.InitialReplies.AddRange(replies.Select(createCommentWithReplies));
drawableComment.Replies.AddRange(replies.Select(createCommentWithReplies));
return drawableComment;
}
@ -139,7 +139,7 @@ namespace osu.Game.Overlays.Comments
uniqueComments.ForEach(c => c.ParentComment = drawableComment.Comment);
drawableComment.AddReplies(uniqueComments.Select(createDrawableComment));
drawableComment.Replies.AddRange(uniqueComments.Select(createDrawableComment));
}
private DrawableComment createDrawableComment(Comment comment) => new DrawableComment(comment)