[MM-11004] Fix continuous channel loading (#1803)
* fix continuous channel loading * revert change on limiting number of pages requested
This commit is contained in:
parent
5d579cdfcf
commit
0e692c2088
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue