Force history messages to always be at the front of the messages array
This commit is contained in:
parent
1d7b7727d2
commit
e7e1758fa4
@ -151,7 +151,7 @@ export default class Chat extends Component {
|
||||
// extra user names
|
||||
const chatUserNames = extraUserNamesFromMessageHistory(data);
|
||||
this.setState({
|
||||
messages: this.state.messages.concat(data),
|
||||
messages: data.concat(this.state.messages),
|
||||
chatUserNames,
|
||||
});
|
||||
this.scrollToBottom();
|
||||
|
Loading…
Reference in New Issue
Block a user