sort pinned top-level comments by most recent first

master
Aevann 2022-11-28 01:16:46 +02:00
parent 4b8387a01c
commit ca8c8297c5
1 changed files with 1 additions and 0 deletions

View File

@ -213,6 +213,7 @@ def post_id(pid, anything=None, v=None, sub=None):
pinned2.add(pin)
pinned = list(pinned2)
pinned.sort(key=lambda x: x.created_utc, reverse=True)
post.replies = pinned + comments
post.views += 1