[MM-11004] Fix continuous channel loading (#1803)

* fix continuous channel loading

* revert change on limiting number of pages requested
This commit is contained in:
Saturnino Abril 2018-07-04 23:06:45 +08:00 committed by Elias Nahum
parent 5d579cdfcf
commit 0e692c2088

View file

@ -511,17 +511,19 @@ export function increasePostVisibility(channelId, focusedPostId) {
}];
const posts = result.data;
let hasMorePost = false;
if (posts) {
hasMorePost = posts.order.length >= pageSize;
// make sure to increment the posts visibility
// only if we got results
actions.push(doIncreasePostVisibility(channelId));
actions.push(setLoadMorePostsVisible(posts.order.length >= pageSize));
actions.push(setLoadMorePostsVisible(hasMorePost));
}
dispatch(batchActions(actions));
return Boolean(posts);
return hasMorePost;
};
}