mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09: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)
|
private void onCommentRepliesReceived(CommentBundle response, DrawableComment drawableComment)
|
||||||
{
|
{
|
||||||
var receivedComments = response.Comments;
|
|
||||||
|
|
||||||
var uniqueComments = new List<Comment>();
|
|
||||||
|
|
||||||
// We may receive already loaded comments
|
// We may receive already loaded comments
|
||||||
receivedComments.ForEach(c =>
|
var uniqueComments = response.Comments.Where(c => !drawableComment.ContainsReply(c.Id)).ToList();
|
||||||
{
|
|
||||||
if (!drawableComment.ContainsReply(c.Id))
|
|
||||||
uniqueComments.Add(c);
|
|
||||||
});
|
|
||||||
|
|
||||||
uniqueComments.ForEach(c => c.ParentComment = drawableComment.Comment);
|
uniqueComments.ForEach(c => c.ParentComment = drawableComment.Comment);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user