mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
Add ability to hide comments on levels and profiles
This commit is contained in:
parent
0b8c0cbfb4
commit
8fe9bd4c57
12 changed files with 123 additions and 16 deletions
|
@ -13,7 +13,7 @@ public class UserPage : BaseLayout
|
|||
{
|
||||
public List<Comment>? Comments;
|
||||
|
||||
public bool CommentsEnabled = ServerConfiguration.Instance.UserGeneratedContentLimits.ProfileCommentsEnabled;
|
||||
public bool CommentsEnabled;
|
||||
|
||||
public bool IsProfileUserHearted;
|
||||
|
||||
|
@ -51,7 +51,9 @@ public class UserPage : BaseLayout
|
|||
}
|
||||
|
||||
this.Photos = await this.Database.Photos.Include(p => p.Slot).OrderByDescending(p => p.Timestamp).Where(p => p.CreatorId == userId).Take(6).ToListAsync();
|
||||
if (this.CommentsEnabled)
|
||||
|
||||
this.CommentsEnabled = ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled && this.ProfileUser.CommentsEnabled;
|
||||
if(this.CommentsEnabled)
|
||||
{
|
||||
this.Comments = await this.Database.Comments.Include(p => p.Poster)
|
||||
.OrderByDescending(p => p.Timestamp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue