1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-13 08:02:38 +03:00

Send visibility only when changed, and messaging is available

This commit is contained in:
Luke Barnard
2018-05-11 18:06:58 +01:00
parent 1f2f3474ed
commit 06898394eb
2 changed files with 14 additions and 14 deletions

View File

@@ -172,12 +172,7 @@ export default class AppTile extends React.Component {
componentDidUpdate() {
// Allow parents to access widget messaging
if (this.props.collectWidgetMessaging) {
this.props.collectWidgetMessaging(new Promise((resolve) => {
if (this.widgetMessaging) resolve(this.widgetMessaging);
// Expect this to be resolved later
this._exposeWidgetMessaging = resolve;
}));
this.props.collectWidgetMessaging(this.widgetMessaging);
}
}