Merge branch 'bugfix/notification-loading' of https://github.com/esteemapp/esteem-mobile into bugfix/notification-loading

This commit is contained in:
u-e 2019-01-15 15:40:56 +03:00
commit cc39075a36

View File

@ -37,15 +37,17 @@ class NotificationContainer extends Component {
this.setState({ notificationLoading: true });
getActivities({ user: username, type, since }).then((res) => {
const lastId = [...res].pop().id;
getActivities({ user: username, type, since })
.then((res) => {
const lastId = [...res].pop().id;
this.setState({
notifications: loadMore ? [...notifications, ...res] : res,
lastNotificationId: lastId,
notificationLoading: false,
});
});
this.setState({
notifications: loadMore ? [...notifications, ...res] : res,
lastNotificationId: lastId,
notificationLoading: false,
});
})
.catch(() => this.setState({ notificationLoading: false }));
};
_navigateToNotificationRoute = (data) => {