diff --git a/files/routes/users.py b/files/routes/users.py index 49ac47abe2..9ea64e931c 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -1034,9 +1034,20 @@ def u_username_comments(username, v=None): for x in comments: if x.replies2 == None: x.replies2 = [] if x.parent_comment_id: - x.parent_comment.replies2 = [x] + if x.parent_comment.replies2 == None: + x.parent_comment.replies2 = [] + + x.parent_comment.replies2.append(x) + x.parent_comment.replies2.sort(key=lambda x: x.created_utc, reverse=True) + x = x.parent_comment if x.id in ids: continue + if x.parent_comment_id in ids: + if x.parent_comment.replies2 == None: + x.parent_comment.replies2 = [] + x.parent_comment.replies2.append(x) + x.parent_comment.replies2.sort(key=lambda x: x.created_utc, reverse=True) + continue listing.append(x) ids.update([x.id for x in listing]) diff --git a/files/templates/comments.html b/files/templates/comments.html index ee055f7fe9..65bc2ecc8a 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -113,13 +113,15 @@ {% set isreply = False %} {% endif %} +{% set highlight_for_profile = request.path.startswith('/@') and request.path.endswith('/comments') and v and c.author_id == v.id %} +
{% if not isreply %} {% endif %}
-
+