forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-09-01 19:12:48 +02:00
parent f2d8468b9c
commit 5cf40f2cb8
1 changed files with 8 additions and 6 deletions

View File

@ -51,15 +51,17 @@ def notifications(v):
Comment.author_id != AUTOJANNY_ACCOUNT,
).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(26)
comments = []
cids = [x.comment_id for x in notifications]
next_exists = (len(cids) == 26)
cids = cids[:25]
comments = get_comments(cids, v=v)
i = 0
for x in notifications:
c = x.comment
if not x.read: c.unread = True
if not x.read: comments[i].unread = True
x.read = True
g.db.add(x)
comments.append(c)
next_exists = (len(comments) == 26)
comments = comments[:25]
i += 1
listing = []
for c in comments: