mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
Separate user and icon query in GameUserSlot
This commit is contained in:
parent
92b631c533
commit
bee3e39c74
1 changed files with 3 additions and 6 deletions
|
@ -245,16 +245,13 @@ public class GameUserSlot : SlotBase, INeedsPreparationForSerialization
|
|||
PhotoCount = database.Photos.Count(p => p.SlotId == this.SlotId),
|
||||
AuthorPhotoCount = database.Photos.Count(p => p.SlotId == this.SlotId && p.CreatorId == this.CreatorId),
|
||||
HeartCount = database.HeartedLevels.Count(h => h.SlotId == this.SlotId),
|
||||
UsernameAndIcon = database.Users.Where(u => u.UserId == this.CreatorId).Select(u => new
|
||||
{
|
||||
u.Username,
|
||||
u.IconHash,
|
||||
}).First(),
|
||||
Username = database.Users.Where(u => u.UserId == this.CreatorId).Select(u => u.Username).First(),
|
||||
IconHash = database.Users.Where(u => u.UserId == this.CreatorId).Select(u => u.Username).First(),
|
||||
})
|
||||
.OrderBy(_ => 1)
|
||||
.FirstAsync();
|
||||
ReflectionHelper.CopyAllFields(stats, this);
|
||||
this.AuthorHandle = new NpHandle(stats.UsernameAndIcon.Username, stats.UsernameAndIcon.IconHash);
|
||||
this.AuthorHandle = new NpHandle(stats.Username, stats.IconHash);
|
||||
|
||||
if (this.GameVersion == GameVersion.LittleBigPlanet1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue