remotes/1693045480750635534/spooky-22
Aevann1 2021-09-11 06:37:53 +02:00
parent 424adaa673
commit 76400edc24
1 changed files with 4 additions and 4 deletions

View File

@ -33,19 +33,19 @@ def notifications(v):
cids = cids[:100]
comments = get_comments(cids, v=v)
elif posts:
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(100 * (page - 1)).all()
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(25 * (page - 1)).all()
comments = []
for index, x in enumerate(notifications):
c = x.comment
if x.read and index > 101: break
if x.read and index > 26: break
elif not x.read:
c.unread = True
x.read = True
g.db.add(x)
comments.append(c)
next_exists = (len(comments) > 100)
listing = comments[:100]
next_exists = (len(comments) > 25)
listing = comments[:25]
else:
notifications = v.notifications.join(Notification.comment).filter(