From 82315c8b9a433127e60049aab8e781d7a70d3135 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 6 Jan 2022 20:47:11 +0200 Subject: [PATCH] dasads --- files/routes/front.py | 5 +---- files/templates/comments.html | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index bdf3a870f4..01231fbb00 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -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() diff --git a/files/templates/comments.html b/files/templates/comments.html index 118a6286de..d1087dcbdb 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -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) %} Reply