Browse Source

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.
closed-social-glitch-2
unarist 6 years ago
committed by Eugen Rochko
parent
commit
cc382c5006
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      app/javascript/mastodon/components/status.js

+ 4
- 1
app/javascript/mastodon/components/status.js View File

@ -154,7 +154,10 @@ class Status extends ImmutablePureComponent {
render () { render () {
let media = null; let media = null;
let statusAvatar; 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; const { isExpanded, isIntersecting, isHidden } = this.state;
if (status === null) { if (status === null) {

Loading…
Cancel
Save