Optimize rendering

This commit is contained in:
Fedor Indutny 2021-08-11 09:23:21 -07:00 committed by GitHub
parent 81f06e2404
commit 12c78c742f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 702 additions and 444 deletions

View file

@ -4,6 +4,7 @@
import { connect } from 'react-redux';
import { mapDispatchToProps } from '../actions';
import { TypingBubble } from '../../components/conversation/TypingBubble';
import { strictAssert } from '../../util/assert';
import { StateType } from '../reducer';
import { getIntl } from '../selectors/user';
@ -21,6 +22,8 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
throw new Error(`Did not find conversation ${id} in state!`);
}
strictAssert(conversation.typingContact, 'Missing typingContact');
return {
...conversation.typingContact,
conversationType: conversation.type,