From d85dcea10196b669057ca53bd0f49b8dc76d577a Mon Sep 17 00:00:00 2001 From: Deimos Date: Wed, 4 Sep 2019 15:37:36 -0600 Subject: [PATCH] Check user is logged-in for Collapse Read button --- tildes/tildes/templates/topic.jinja2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tildes/tildes/templates/topic.jinja2 b/tildes/tildes/templates/topic.jinja2 index 19ec77e..ae743ae 100644 --- a/tildes/tildes/templates/topic.jinja2 +++ b/tildes/tildes/templates/topic.jinja2 @@ -174,7 +174,8 @@ {# Display the "Collapse read" button if the user is tracking comment visits but not automatically collapsing old comments, and there are new comments #} - {% if request.user.track_comment_visits + {% if request.user + and request.user.track_comment_visits and not request.user.collapse_old_comments and topic.comments_since_last_visit > 0 %}