Chat render improbement
This commit is contained in:
parent
8a241ba2b7
commit
230b2b02fa
|
@ -51,7 +51,10 @@ class Chat extends AbstractChat<Props> {
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const messages = this.props._messages.map(this._transformMessage);
|
// Gifted chat requires a special object format and a reversed list
|
||||||
|
// of messages.
|
||||||
|
const messages
|
||||||
|
= this.props._messages.map(this._transformMessage).reverse();
|
||||||
const modalStyle = [
|
const modalStyle = [
|
||||||
styles.modalBackdrop
|
styles.modalBackdrop
|
||||||
];
|
];
|
||||||
|
@ -156,11 +159,6 @@ function _mapStateToProps(state) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...abstractReduxProps,
|
...abstractReduxProps,
|
||||||
|
|
||||||
// Gifted chat requires the messages to be reverse ordered.
|
|
||||||
_messages: [
|
|
||||||
...abstractReduxProps._messages
|
|
||||||
].reverse(),
|
|
||||||
_solidBackground: state['features/base/conference'].audioOnly
|
_solidBackground: state['features/base/conference'].audioOnly
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue