Fix expanded statuses not always being scrolled into view (#21797)
This commit is contained in:
		
							parent
							
								
									2821d7aaa7
								
							
						
					
					
						commit
						feaa152fcd
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -222,6 +222,10 @@ class Status extends ImmutablePureComponent {
 | 
				
			||||||
      this.props.dispatch(fetchStatus(nextProps.params.statusId));
 | 
					      this.props.dispatch(fetchStatus(nextProps.params.statusId));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (nextProps.params.statusId && nextProps.ancestorsIds.size > this.props.ancestorsIds.size) {
 | 
				
			||||||
 | 
					      this._scrolledIntoView = false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (nextProps.status && nextProps.status.get('id') !== this.state.loadedStatusId) {
 | 
					    if (nextProps.status && nextProps.status.get('id') !== this.state.loadedStatusId) {
 | 
				
			||||||
      this.setState({ showMedia: defaultMediaVisibility(nextProps.status), loadedStatusId: nextProps.status.get('id') });
 | 
					      this.setState({ showMedia: defaultMediaVisibility(nextProps.status), loadedStatusId: nextProps.status.get('id') });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue