diff --git a/files/classes/user.py b/files/classes/user.py index bc27aaee4..9fb35ce57 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -428,17 +428,16 @@ class User(Base): if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=200" return f"https://{site}/assets/images/default-profile-pic.webp" - @property @lazy - def json_popover(self): + def json_popover(self, v): data = {'username': self.username, 'url': self.url, 'profile_url': self.profile_url, 'bannerurl': self.banner_url, 'bio_html': self.bio_html_eager, 'coins': self.coins, - 'post_count': self.post_count, - 'comment_count': self.comment_count, + 'post_count': 0 if self.shadowbanned and not (v and (v.shadowbanned or v.admin_level)) else self.post_count, + 'comment_count': 0 if self.shadowbanned and not (v and (v.shadowbanned or v.admin_level)) else self.comment_count, 'badges': [x.path for x in self.badges], } diff --git a/files/templates/CHRISTMAS/comments.html b/files/templates/CHRISTMAS/comments.html index d03d8b9df..a722d670b 100644 --- a/files/templates/CHRISTMAS/comments.html +++ b/files/templates/CHRISTMAS/comments.html @@ -232,7 +232,7 @@ - + {% if c.author.patron and not c.distinguish_level %} diff --git a/files/templates/CHRISTMAS/submission.html b/files/templates/CHRISTMAS/submission.html index 0bfd40fe0..bc857a518 100644 --- a/files/templates/CHRISTMAS/submission.html +++ b/files/templates/CHRISTMAS/submission.html @@ -270,7 +270,7 @@ {% endif %} - + {% if p.author.patron and not p.distinguish_level %} diff --git a/files/templates/CHRISTMAS/submission_listing.html b/files/templates/CHRISTMAS/submission_listing.html index f1f69e438..05825fce7 100644 --- a/files/templates/CHRISTMAS/submission_listing.html +++ b/files/templates/CHRISTMAS/submission_listing.html @@ -113,7 +113,7 @@ {% endif %} {% if not p.award_count('ghosts') %} - + {% if p.author.patron and not p.distinguish_level %} diff --git a/files/templates/CHRISTMAS/userpage.html b/files/templates/CHRISTMAS/userpage.html index 376d9bcd1..f06503368 100644 --- a/files/templates/CHRISTMAS/userpage.html +++ b/files/templates/CHRISTMAS/userpage.html @@ -14,7 +14,7 @@ - + @@ -25,7 +25,7 @@ - + {% endblock %} @@ -246,12 +246,12 @@