diff options
author | unarist <m.unarist@gmail.com> | 2017-06-21 13:47:36 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-21 06:47:36 +0200 |
commit | cc382c5006ed5c4c18c3547150b214807b217c7b (patch) | |
tree | 428568011d8bfeaa60beff03f93d362531acdee6 /app/javascript | |
parent | 946a166791e5a1a10778e15ca4a9f5f10c961134 (diff) |
Don't attach IntersectionObserver for wrapped statuses (#3883)
(This patch has been merged as bugfix and reverted, but still valuable as improvement) Previously, we've attached IntersectionObserver twice for boosted statuses: wrapper Status and wrapped Status. but wrapped Status don't need to manage intersection and visibility by itself, because it's a part of wrapper Status.
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/components/status.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 325aceb5b..1363956cf 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -154,7 +154,10 @@ class Status extends ImmutablePureComponent { render () { let media = null; let statusAvatar; - const { status, account, ...other } = this.props; + + // Exclude intersectionObserverWrapper from `other` variable + // because intersection is managed in here. + const { status, account, intersectionObserverWrapper, ...other } = this.props; const { isExpanded, isIntersecting, isHidden } = this.state; if (status === null) { |