Skip to content
Extraits de code Groupes Projets
Valider 94ad0706 rédigé par unarist's avatar unarist Validation de Eugen Rochko
Parcourir les fichiers

Don't attach IntersectionObserver for wrapped statuses (#3863)

This fixes a bug that sometimes boosted statuses being hidden on scrolling.

Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. This will call intersection handler twice,
so this may results race condition...probably.
parent bf8c2c43
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -154,7 +154,10 @@ class Status extends ImmutablePureComponent { ...@@ -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) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter