From cd9591cd2897460a71aadf5573be397abc38e235 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 10 Dec 2022 19:06:28 +0200 Subject: [PATCH] make post.new work when viewing comment --- files/routes/comments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 601eb91c3..587b66379 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -60,7 +60,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): context -= 1 top_comment = c - if v: defaultsortingcomments = v.defaultsortingcomments + if post.new: defaultsortingcomments = 'new' + elif v: defaultsortingcomments = v.defaultsortingcomments else: defaultsortingcomments = "hot" sort=request.values.get("sort", defaultsortingcomments)