You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
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:
@@ -112,7 +112,7 @@ module.exports = createReactClass({
|
|||||||
replacingEventId={this.props.replacingEventId}
|
replacingEventId={this.props.replacingEventId}
|
||||||
editState={this.props.editState}
|
editState={this.props.editState}
|
||||||
onHeightChanged={this.props.onHeightChanged}
|
onHeightChanged={this.props.onHeightChanged}
|
||||||
onTileUpdate={this.onTileUpdate}
|
onMessageAllowed={this.onTileUpdate}
|
||||||
/>;
|
/>;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {_t} from '../../../languageHandler';
|
|||||||
export default class MjolnirBody extends React.Component {
|
export default class MjolnirBody extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
mxEvent: PropTypes.object.isRequired,
|
mxEvent: PropTypes.object.isRequired,
|
||||||
onTileUpdate: PropTypes.func.isRequired,
|
onMessageAllowed: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor() {
|
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()}`;
|
const key = `mx_mjolnir_render_${this.props.mxEvent.getRoomId()}__${this.props.mxEvent.getId()}`;
|
||||||
localStorage.setItem(key, "true");
|
localStorage.setItem(key, "true");
|
||||||
this.props.onTileUpdate();
|
this.props.onMessageAllowed();
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user