fixed notification data getting ignore after refresh

This commit is contained in:
Nouman Tahir 2021-04-05 17:43:35 +05:00
parent dac6ac9b7f
commit ba1d026afe

View File

@ -47,7 +47,8 @@ class NotificationContainer extends Component {
.then((res) => {
console.log(res);
const lastId = res.length > 0 ? [...res].pop().id : null;
if (lastId === lastNotificationId || res.length === 0) {
if (loadMore && (lastId === lastNotificationId || res.length === 0)) {
this.setState({
endOfNotification: true,
isNotificationRefreshing: false,