convert md<->rt if the stored editorState was in a different state

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-07-11 09:39:14 +01:00
parent abbb69dc36
commit fd4f9679df
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E
2 changed files with 37 additions and 26 deletions

View file

@ -54,7 +54,10 @@ class MessageComposerStore extends Store {
_editorState(payload) {
const editorStateMap = this._state.editorStateMap;
editorStateMap[payload.room_id] = payload.editor_state;
editorStateMap[payload.room_id] = {
editor_state: payload.editor_state,
rich_text: payload.rich_text,
};
localStorage.setItem('editor_state', JSON.stringify(editorStateMap));
this._setState({
editorStateMap: editorStateMap,