make the MessageComposerStore stateless for better performance
and inter-tab composition (by simplifying it. WIN-WIN) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
59a14f2c0b
commit
2f1779751b
2 changed files with 27 additions and 62 deletions
|
@ -589,14 +589,8 @@ export default class MessageComposerInput extends React.Component {
|
|||
this.props.onInputStateChanged(inputState);
|
||||
}
|
||||
|
||||
// Record the editor state for this room so that it can be retrieved after
|
||||
// switching to another room and back
|
||||
dis.dispatch({
|
||||
action: 'editor_state',
|
||||
room_id: this.props.room.roomId,
|
||||
rich_text: this.state.isRichTextEnabled,
|
||||
editor_state: editorState,
|
||||
});
|
||||
// Record the editor state for this room so that it can be retrieved after switching to another room and back
|
||||
MessageComposerStore.setEditorState(this.props.room.roomId, editorState, this.state.isRichTextEnabled);
|
||||
|
||||
this.setState({
|
||||
editorState,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue