feat: Cache status height to avoid expensive renders (#4439)
* feat: Cache status height to avoid expensive renders * feat: Escape content and emojify in reducers * fix(css): Remove backface-visibility: hidden from .scrollable * fix(statuses): Avoid creating DOMParses inside a loop
This commit is contained in:
		
					parent
					
						
							
								5942347407
							
						
					
				
			
			
				commit
				
					
						8eb6d171e6
					
				
			
		
					 15 changed files with 83 additions and 57 deletions
				
			
		|  | @ -16,7 +16,7 @@ import { | |||
|   blockAccount, | ||||
|   muteAccount, | ||||
| } from '../actions/accounts'; | ||||
| import { muteStatus, unmuteStatus, deleteStatus } from '../actions/statuses'; | ||||
| import { muteStatus, unmuteStatus, deleteStatus, setStatusHeight } from '../actions/statuses'; | ||||
| import { initReport } from '../actions/reports'; | ||||
| import { openModal } from '../actions/modal'; | ||||
| import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; | ||||
|  | @ -124,6 +124,10 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ | |||
|     } | ||||
|   }, | ||||
| 
 | ||||
|   onHeightChange (status, height) { | ||||
|     dispatch(setStatusHeight(status.get('id'), height)); | ||||
|   }, | ||||
| 
 | ||||
| }); | ||||
| 
 | ||||
| export default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Status)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue