From e1d9ab3848860d536f831c360838051b22cc0e67 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 7 Mar 2023 13:54:12 +0200 Subject: [PATCH] make notif collapsing work better with actual replies --- files/templates/comments.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index 92ad29a25..04d5403ed 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -513,7 +513,12 @@
{% 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 %}