Fix heart count on users in-game

This commit is contained in:
Slendy 2023-03-28 20:25:26 -05:00
commit d41b518fc2
No known key found for this signature in database
GPG key ID: 7288D68361B91428

View file

@ -171,6 +171,7 @@ public class GameUser : ILbpSerializable, INeedsPreparationForSerialization
PlaylistCount = database.Playlists.Count(p => p.CreatorId == this.UserId),
ReviewCount = database.Reviews.Count(r => r.ReviewerId == this.UserId),
CommentCount = database.Comments.Count(c => c.TargetId == this.UserId && c.Type == CommentType.Profile),
HeartCount = database.HeartedProfiles.Count(h => h.HeartedUserId == this.UserId),
PhotosByMeCount = database.Photos.Count(p => p.CreatorId == this.UserId),
PhotosWithMeCount = database.Photos.Include(p => p.PhotoSubjects)
.Count(p => p.PhotoSubjects.Any(ps => ps.UserId == this.UserId)),