From ed4be20be22b4e11fd96c114d558ac7638ae3808 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 19 Oct 2015 15:27:46 +1030 Subject: [PATCH] Only decrease unread count if notification is unread closes #590 --- framework/core/js/forum/src/components/Notification.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/core/js/forum/src/components/Notification.js b/framework/core/js/forum/src/components/Notification.js index 05b5f1d84..ff8336a75 100644 --- a/framework/core/js/forum/src/components/Notification.js +++ b/framework/core/js/forum/src/components/Notification.js @@ -77,7 +77,10 @@ export default class Notification extends Component { * Mark the notification as read. */ markAsRead() { + if (this.props.notification.isRead()) return; + app.session.user.pushAttributes({unreadNotificationsCount: app.session.user.unreadNotificationsCount() - 1}); + this.props.notification.save({isRead: true}); } }