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
				
			
		|  | @ -4,8 +4,6 @@ import StatusContainer from '../../../containers/status_container'; | |||
| import AccountContainer from '../../../containers/account_container'; | ||||
| import { FormattedMessage } from 'react-intl'; | ||||
| import Permalink from '../../../components/permalink'; | ||||
| import emojify from '../../../emoji'; | ||||
| import escapeTextContentForBrowser from 'escape-html'; | ||||
| import ImmutablePureComponent from 'react-immutable-pure-component'; | ||||
| 
 | ||||
| export default class Notification extends ImmutablePureComponent { | ||||
|  | @ -67,9 +65,8 @@ export default class Notification extends ImmutablePureComponent { | |||
|   render () { | ||||
|     const { notification } = this.props; | ||||
|     const account          = notification.get('account'); | ||||
|     const displayName      = account.get('display_name').length > 0 ? account.get('display_name') : account.get('username'); | ||||
|     const displayNameHTML  = { __html: emojify(escapeTextContentForBrowser(displayName)) }; | ||||
|     const link             = <Permalink className='notification__display-name' href={account.get('url')} title={account.get('acct')} to={`/accounts/${account.get('id')}`} dangerouslySetInnerHTML={displayNameHTML} />; | ||||
|     const displayNameHtml  = { __html: account.get('display_name_html') }; | ||||
|     const link             = <Permalink className='notification__display-name' href={account.get('url')} title={account.get('acct')} to={`/accounts/${account.get('id')}`} dangerouslySetInnerHTML={displayNameHtml} />; | ||||
| 
 | ||||
|     switch(notification.get('type')) { | ||||
|     case 'follow': | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue