1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-24 23:26:22 +09:00

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.
This commit is contained in:
unarist 2017-06-21 13:47:36 +09:00 committed by Eugen Rochko
parent 946a166791
commit cc382c5006

View File

@ -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) {