mirror of
https://github.com/simple-login/app.git
synced 2024-09-29 21:21:29 +02:00
mark a notification as read when user arrives on the notification page
This commit is contained in:
parent
b6b917eba8
commit
0e3a5c3d3c
@ -23,6 +23,10 @@ def notification_route(notification_id):
|
|||||||
)
|
)
|
||||||
return redirect(url_for("dashboard.index"))
|
return redirect(url_for("dashboard.index"))
|
||||||
|
|
||||||
|
if not notification.read:
|
||||||
|
notification.read = True
|
||||||
|
Session.commit()
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
notification_title = notification.title or notification.message[:20]
|
notification_title = notification.title or notification.message[:20]
|
||||||
Notification.delete(notification_id)
|
Notification.delete(notification_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user