mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
parent
23eb4c805b
commit
ed4be20be2
|
@ -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});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user