mirror of
https://github.com/flarum/framework.git
synced 2025-06-08 01:34:33 +08:00
Sync notification count when clicking on them or marking all as read
Refs #500.
This commit is contained in:
@ -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});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user