Skip to content

Commit

Permalink
Fix IntersectionObserverArticle not hiding some out-of-view items (ma…
Browse files Browse the repository at this point in the history
…stodon#9982)

IntersectionObserverArticle is made to save on RAM by avoiding fully rendering
items that are far out of view. However, it did not work for items spawned
outside the intersection observer.
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent f0ee884 commit d898904
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ export default class IntersectionObserverArticle extends React.Component {
}

updateStateAfterIntersection = (prevState) => {
if (prevState.isIntersecting && !this.entry.isIntersecting) {
if (prevState.isIntersecting !== false && !this.entry.isIntersecting) {
scheduleIdleTask(this.hideIfNotIntersecting);
}
return {

0 comments on commit d898904

Please sign in to comment.