Sync notification count when clicking on them or marking all as read

Refs #500.
This commit is contained in:
Franz Liedke
2015-09-29 01:28:14 +02:00
parent f5b5d9ca5c
commit ce094be83e
2 changed files with 5 additions and 2 deletions

View File

@ -77,6 +77,7 @@ export default class Notification extends Component {
* Mark the notification as read.
*/
markAsRead() {
app.session.user.pushAttributes({unreadNotificationsCount: app.session.user.unreadNotificationsCount() - 1});
this.props.notification.save({isRead: true});
}
}