From 6fdeb0b62929805ac8b1e93821536103d28e7a91 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 27 Mar 2024 00:48:32 +0200 Subject: [PATCH] remove param i dont use anymroe --- files/routes/notifications.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 04a2b59b0..ac303b3c3 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -94,7 +94,7 @@ def notifications_messages(v): # Clear notifications (used for unread indicator only) for all user messages. - if not session.get("GLOBAL") and not request.values.get('nr'): + if not session.get("GLOBAL"): notifs_unread_row = g.db.query(Notification.comment_id).join(Comment).filter( Notification.user_id == v.id, Notification.read == False, @@ -164,7 +164,7 @@ def notifications_modmail(v): if c.author_id == v.id: continue c.unread = c.created_utc > v.last_viewed_modmail_notifs - if not session.get("GLOBAL") and not request.values.get('nr'): + if not session.get("GLOBAL"): v.last_viewed_modmail_notifs = int(time.time()) g.db.add(v) @@ -218,7 +218,7 @@ def notifications_posts(v): for p in listing: p.unread = p.created_utc > v.last_viewed_post_notifs - if not session.get("GLOBAL") and not request.values.get('nr'): + if not session.get("GLOBAL"): v.last_viewed_post_notifs = int(time.time()) g.db.add(v) @@ -266,7 +266,7 @@ def notifications_modactions(v): for ma in listing: ma.unread = ma.created_utc > v.last_viewed_log_notifs - if not session.get("GLOBAL") and not request.values.get('nr'): + if not session.get("GLOBAL"): v.last_viewed_log_notifs = int(time.time()) g.db.add(v) @@ -303,7 +303,7 @@ def notifications_offsite(v): for ma in listing: ma.unread = ma.created_utc > v.last_viewed_offsite_notifs - if not session.get("GLOBAL") and not request.values.get('nr'): + if not session.get("GLOBAL"): v.last_viewed_offsite_notifs = int(time.time()) g.db.add(v) @@ -328,7 +328,7 @@ def notifications_offsite(v): def notifications(v): page = get_page() - if not session.get("GLOBAL") and v.admin_level < PERMS['USER_SHADOWBAN'] and not request.values.get('nr'): + if not session.get("GLOBAL") and v.admin_level < PERMS['USER_SHADOWBAN']: unread_and_inaccessible = g.db.query(Notification).join(Notification.comment).join(Comment.author).filter( Notification.user_id == v.id, Notification.read == False, @@ -407,7 +407,7 @@ def notifications(v): if c not in listing: listing.append(c) - if not n.read and not session.get("GLOBAL") and not request.values.get('nr'): + if not n.read and not session.get("GLOBAL"): n.read = True g.db.add(n)