From 86be607e92dbf148498e284d083e62b8716be2a8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 6 Nov 2019 10:52:00 -0700 Subject: [PATCH] onTileUpdate -> onMessageAllowed We keep onTileUpdate in MessgeEvent because it's a generic thing for the class to handle. onMessageAllowed is slightly different than onShowAllowed because "show allowed" doesn't quite make sense on its own, imo. --- src/components/views/messages/MessageEvent.js | 2 +- src/components/views/messages/MjolnirBody.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/messages/MessageEvent.js b/src/components/views/messages/MessageEvent.js index 0d22658884..e75bcc4332 100644 --- a/src/components/views/messages/MessageEvent.js +++ b/src/components/views/messages/MessageEvent.js @@ -112,7 +112,7 @@ module.exports = createReactClass({ replacingEventId={this.props.replacingEventId} editState={this.props.editState} onHeightChanged={this.props.onHeightChanged} - onTileUpdate={this.onTileUpdate} + onMessageAllowed={this.onTileUpdate} />; }, }); diff --git a/src/components/views/messages/MjolnirBody.js b/src/components/views/messages/MjolnirBody.js index d03c6c658d..baaee91657 100644 --- a/src/components/views/messages/MjolnirBody.js +++ b/src/components/views/messages/MjolnirBody.js @@ -21,7 +21,7 @@ import {_t} from '../../../languageHandler'; export default class MjolnirBody extends React.Component { static propTypes = { mxEvent: PropTypes.object.isRequired, - onTileUpdate: PropTypes.func.isRequired, + onMessageAllowed: PropTypes.func.isRequired, }; constructor() { @@ -34,7 +34,7 @@ export default class MjolnirBody extends React.Component { const key = `mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`; localStorage.setItem(key, "true"); - this.props.onTileUpdate(); + this.props.onMessageAllowed(); }; render() {