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.
This commit is contained in:
Travis Ralston 2019-11-06 10:52:00 -07:00
parent 07b8e128d2
commit 86be607e92
2 changed files with 3 additions and 3 deletions

View file

@ -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}
/>;
},
});

View file

@ -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() {