forked from rDrama/rDrama
make position of notifs that have the same created_utc ordered by comment id
parent
65d548683f
commit
ab0c194869
|
@ -319,7 +319,7 @@ def notifications(v:User):
|
||||||
Comment.deleted_utc == 0,
|
Comment.deleted_utc == 0,
|
||||||
)
|
)
|
||||||
|
|
||||||
comments = comments.order_by(Notification.created_utc.desc())
|
comments = comments.order_by(Notification.created_utc.desc(), Comment.id.desc())
|
||||||
comments = comments.offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE+1).all()
|
comments = comments.offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE+1).all()
|
||||||
|
|
||||||
next_exists = (len(comments) > PAGE_SIZE)
|
next_exists = (len(comments) > PAGE_SIZE)
|
||||||
|
|
Loading…
Reference in New Issue