Only decrease unread count if notification is unread

closes #590
This commit is contained in:
Toby Zerner 2015-10-19 15:27:46 +10:30
parent 23eb4c805b
commit ed4be20be2

View File

@ -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});
}
}