Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-13180 Call load posts earlier for infinite scroll #2079

Merged
merged 4 commits into from
Dec 24, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix issue of loading posts not getting triggered at right position
when lot of posts are loaded

  * scrollHeightAoveFoldForLoad can be really high when lot of posts are loaded
    comaparision with max value should be with scrollTop value
  • Loading branch information
sudheerDev committed Dec 20, 2018
commit 0901811e9811fd4e2d1f95942748e2c228c36c9e
2 changes: 1 addition & 1 deletion components/post_view/post_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export default class PostList extends React.PureComponent {

if (postListScrollTop < LOADPOSTS_MIN_HEIGHT) {
shouldLoadPosts = true;
} else if ((scrollHeightAoveFoldForLoad < LOADPOSTS_MAX_HEIGHT) && (postListScrollTop < scrollHeightAoveFoldForLoad)) {
} else if ((postListScrollTop < LOADPOSTS_MAX_HEIGHT) && (postListScrollTop < scrollHeightAoveFoldForLoad)) {
shouldLoadPosts = true;
}

Expand Down