forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-01-06 20:47:11 +02:00
parent 1bd95b0f35
commit 82315c8b9a
2 changed files with 2 additions and 5 deletions

View File

@ -33,12 +33,9 @@ def notifications(v):
next_exists = (len(comments) > 25)
comments = comments[:25]
elif messages:
comments = g.db.query(Comment).distinct(Comment.parent_comment_id).filter(or_(Comment.author_id==v.id, Comment.sentto==v.id), Comment.parent_submission == None, Comment.sentto != None, not_(Comment.child_comments.any())).order_by(Comment.parent_comment_id.desc()).offset(25*(page-1)).limit(26).all()
comments = g.db.query(Comment).filter(or_(Comment.author_id==v.id, Comment.sentto==v.id), Comment.parent_submission == None, not_(Comment.child_comments.any())).order_by(Comment.id.desc()).offset(25*(page-1)).limit(26).all()
next_exists = (len(comments) > 25)
comments = comments[:25]
elif posts:
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ID).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(101).all()

View File

@ -542,7 +542,7 @@
{% endif %}
{% if request.path == '/notifications' and c.level==1 and not c.parent_submission and c.author_id not in (NOTIFICATIONS_ID, AUTOJANNY_ID) %}
{% if request.path == '/notifications' and not replies and not c.parent_submission and c.author_id not in (NOTIFICATIONS_ID, AUTOJANNY_ID) %}
<a class="btn btn-primary" role="button" onclick="openReplyBox('reply-message-{{c.id}}')">Reply</a>
<pre></pre>
<div id="reply-message-{{c.id}}" class="d-none">