|
|
@ -5,7 +5,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
|
import { injectIntl, defineMessages } from 'react-intl';
|
|
|
|
import { injectIntl, defineMessages } from 'react-intl';
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
fetchChatMessages,
|
|
|
|
|
|
|
|
sendChatMessage,
|
|
|
|
sendChatMessage,
|
|
|
|
markChatRead,
|
|
|
|
markChatRead,
|
|
|
|
} from 'soapbox/actions/chats';
|
|
|
|
} from 'soapbox/actions/chats';
|
|
|
@ -81,11 +80,6 @@ class ChatBox extends ImmutablePureComponent {
|
|
|
|
onSetInputRef(el);
|
|
|
|
onSetInputRef(el);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
const { dispatch, chatId } = this.props;
|
|
|
|
|
|
|
|
dispatch(fetchChatMessages(chatId));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
const markReadConditions = [
|
|
|
|
const markReadConditions = [
|
|
|
|
() => this.props.chat !== undefined,
|
|
|
|
() => this.props.chat !== undefined,
|
|
|
|