Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify isIntersecting in status_list.js #3371

Merged
merged 1 commit into from May 28, 2017

Conversation

nolanlawson
Copy link
Contributor

This has the same functionality as before, but removes some unnecessary object allocations and adds a comment explaining what's going on.

Essentially the point of the array was to force the component to resolve shouldComponentUpdate() to true whenever the isIntersecting map changed (because a new array was created). But we can do this more directly by just incrementing an integer, and then there's no need for an extra array.

@nolanlawson
Copy link
Contributor Author

/cc @sorin-davidoi

@sorin-davidoi
Copy link
Contributor

A much more elegant approach 👍

@Gargron Gargron merged commit 28cbfb9 into mastodon:master May 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants