forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-04-04 02:04:22 +02:00
parent c75d44f28b
commit 75fcc2ed1b
1 changed files with 3 additions and 7 deletions

View File

@ -110,7 +110,7 @@ def notifications(v):
Comment.deleted_utc == 0,
Comment.author_id != AUTOJANNY_ID,
Comment.body_html.notlike('<html><body><p>New rdrama mention: <a href="https://old.reddit.com/r/%')
).order_by(Comment.top_comment_id.desc()).all()]
).order_by(Comment.top_comment_id.desc()).offset(25 * (page - 1)).limit(100).all()]
print("2: " + str(time.time() - t), flush=True)
@ -131,17 +131,13 @@ def notifications(v):
listing = []
for c in comments:
if c.parent_submission:
if c.replies2 == None:
c.replies2 = []
if not c.replies2:
c.replies2 = c.child_comments.filter(or_(Comment.author_id == v.id, Comment.id.in_(all))).all()
print(c.replies2)
cids = cids | set(x.id for x in c.replies2)
while c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment in comments):
c = c.parent_comment
if c.replies2 == None:
c.replies2 = []
if not c.replies2:
c.replies2 = c.child_comments.filter(or_(Comment.author_id == v.id, Comment.id.in_(all))).all()
print(c.replies2)
cids = cids | set(x.id for x in c.replies2)
cids.add(c.id)
else: