make notif collapsing work better with actual replies

pull/138/head
Aevann 2023-03-07 13:54:12 +02:00
parent 042e779ca3
commit e1d9ab3848
1 changed files with 6 additions and 1 deletions

View File

@ -513,7 +513,12 @@
<div id="replies-of-{{c.fullname}}">
{% if request.path.startswith('/notifications') and replies|length > 8 %}
{% for reply in replies %}
{{single_comment(reply, level=level+1, collapse=(not reply.unread and loop.index != replies|length))}}
{% if reply.parent_submission %}
{% set collapse = not reply.unread %}
{% else %}
{% set collapse = not reply.unread and loop.index != replies|length %}
{% endif %}
{{single_comment(reply, level=level+1, collapse=collapse)}}
{% endfor %}
{% elif request.path.startswith('/notifications') or level < 9 %}
{% for reply in replies %}