changed seting unread count dispatch func

This commit is contained in:
ue 2019-08-27 01:22:30 +03:00
parent 31b6a98b1b
commit 50389bc9f8

View File

@ -124,9 +124,9 @@ class NotificationContainer extends Component {
this.setState({ isNotificationRefreshing: true });
markActivityAsRead(username)
.then(result => {
dispatch(updateUnreadActivityCount(result.unread));
.then(() => {
const updatedNotifications = notifications.map(item => ({ ...item, read: 1 }));
dispatch(updateUnreadActivityCount(0));
this.setState({ notifications: updatedNotifications, isNotificationRefreshing: false });
})
.catch(() => {