don't collapse gambling comments when viewing a comment

remotes/1693045480750635534/spooky-22
Aevann1 2022-06-11 11:30:46 +02:00
parent 1f42d228c1
commit 358ce08544
2 changed files with 3 additions and 3 deletions

View File

@ -428,7 +428,7 @@ class Comment(Base):
if self.is_banned: return True
if path.startswith('/post') and (self.slots_result or self.blackjack_result or self.wordle_result) and (not self.body or len(self.body_html) <= 100) and 9 > self.level > 1: return True
if '?context' not in path and (self.slots_result or self.blackjack_result or self.wordle_result) and (not self.body or len(self.body_html) <= 100) and 9 > self.level > 1: return True
if v and v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True
@ -528,4 +528,4 @@ class Comment(Base):
body += f" <em class='text-success'>Insured.</em>"
body += '</span>'
return body
return body

View File

@ -161,7 +161,7 @@
{% set isreply = False %}
{% endif %}
<div id="comment-{{c.id}}" class="anchor comment {% if standalone and level==1 %} mt-0{% endif %} {% if c.collapse_for_user(v,request.path) %}collapsed{% endif %}" style="{% if isreply %}padding-left:0!important;{% else %}border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.namecolor}};{% endif %}{% endif %}">
<div id="comment-{{c.id}}" class="anchor comment {% if standalone and level==1 %} mt-0{% endif %} {% if c.collapse_for_user(v,request.full_path) %}collapsed{% endif %}" style="{% if isreply %}padding-left:0!important;{% else %}border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.namecolor}};{% endif %}{% endif %}">
{% if not isreply %}
<span class="comment-collapse-desktop d-none d-md-block" style="border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.namecolor}}{% endif %}" onclick="collapse_comment('{{c.id}}', this.parentElement)"></span>
{% endif %}