chore: refactor code
pass only the mxEvent object to ViewSource derive the necessary values inside the component
This commit is contained in:
parent
ed6486aabb
commit
51ac5421c9
3 changed files with 86 additions and 90 deletions
|
@ -74,11 +74,7 @@ export default class EditHistoryMessage extends React.PureComponent {
|
|||
_onViewSourceClick = () => {
|
||||
const ViewSource = sdk.getComponent('structures.ViewSource');
|
||||
Modal.createTrackedDialog('View Event Source', 'Edit history', ViewSource, {
|
||||
roomId: this.props.mxEvent.getRoomId(),
|
||||
eventId: this.props.mxEvent.getId(),
|
||||
content: this.props.mxEvent.event,
|
||||
isEncrypted: this.props.mxEvent.getType() !== this.props.mxEvent.getWireType(),
|
||||
decryptedContent: this.props.mxEvent._clearEvent,
|
||||
mxEvent: this.props.mxEvent,
|
||||
}, 'mx_Dialog_viewsource');
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue