mirror of
https://github.com/flarum/core.git
synced 2025-07-15 13:56:23 +02:00
@ -77,7 +77,10 @@ export default class Notification extends Component {
|
|||||||
* Mark the notification as read.
|
* Mark the notification as read.
|
||||||
*/
|
*/
|
||||||
markAsRead() {
|
markAsRead() {
|
||||||
|
if (this.props.notification.isRead()) return;
|
||||||
|
|
||||||
app.session.user.pushAttributes({unreadNotificationsCount: app.session.user.unreadNotificationsCount() - 1});
|
app.session.user.pushAttributes({unreadNotificationsCount: app.session.user.unreadNotificationsCount() - 1});
|
||||||
|
|
||||||
this.props.notification.save({isRead: true});
|
this.props.notification.save({isRead: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user