mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
add pinned comment to users setter in comment bundle
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Online.API.Requests.Responses
|
namespace osu.Game.Online.API.Requests.Responses
|
||||||
{
|
{
|
||||||
@ -52,26 +53,17 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
{
|
{
|
||||||
users = value;
|
users = value;
|
||||||
|
|
||||||
value.ForEach(u =>
|
foreach (var user in value)
|
||||||
{
|
{
|
||||||
Comments.ForEach(c =>
|
foreach (var comment in Comments.Concat(IncludedComments).Concat(PinnedComments))
|
||||||
{
|
{
|
||||||
if (c.UserId == u.Id)
|
if (comment.UserId == user.Id)
|
||||||
c.User = u;
|
comment.User = user;
|
||||||
|
|
||||||
if (c.EditedById == u.Id)
|
if (comment.EditedById == user.Id)
|
||||||
c.EditedUser = u;
|
comment.EditedUser = user;
|
||||||
});
|
}
|
||||||
|
}
|
||||||
IncludedComments.ForEach(c =>
|
|
||||||
{
|
|
||||||
if (c.UserId == u.Id)
|
|
||||||
c.User = u;
|
|
||||||
|
|
||||||
if (c.EditedById == u.Id)
|
|
||||||
c.EditedUser = u;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user