do parts creation only in PartCreator to not scatter dependencies

This commit is contained in:
Bruno Windels 2019-06-14 12:16:34 +02:00
parent 4ce72fdffa
commit eb4ff50c3c
4 changed files with 89 additions and 84 deletions

View file

@ -233,7 +233,7 @@ export default class MessageEditor extends React.Component {
parts = editState.getSerializedParts().map(p => partCreator.deserializePart(p));
} else {
// otherwise, parse the body of the event
parts = parseEvent(editState.getEvent(), room, this.context.matrixClient);
parts = parseEvent(editState.getEvent(), partCreator);
}
return new EditorModel(