1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/widgets

 Conflicts:
	src/components/views/elements/AppTile.js
This commit is contained in:
Michael Telatynski
2020-10-09 08:45:11 +01:00
14 changed files with 1715 additions and 736 deletions

View File

@@ -47,6 +47,7 @@ export default class AppTile extends React.Component {
// The key used for PersistedElement
this._persistKey = getPersistKey(this.props.app.id);
this._sgWidget = new StopGapWidget(this.props);
this._sgWidget.on("preparing", this._onWidgetPrepared);
this._sgWidget.on("ready", this._onWidgetReady);
this.iframe = null; // ref to the iframe (callback style)
@@ -95,9 +96,7 @@ export default class AppTile extends React.Component {
this._sgWidget.stop();
}
this.setState({
hasPermissionToLoad,
});
this.setState({ hasPermissionToLoad });
};
isMixedContent() {
@@ -144,6 +143,7 @@ export default class AppTile extends React.Component {
this._sgWidget.stop();
}
this._sgWidget = new StopGapWidget(newProps);
this._sgWidget.on("preparing", this._onWidgetPrepared);
this._sgWidget.on("ready", this._onWidgetReady);
this._startWidget();
}
@@ -204,8 +204,11 @@ export default class AppTile extends React.Component {
this._sgWidget.stop();
}
_onWidgetReady = () => {
_onWidgetPrepared = () => {
this.setState({loading: false});
};
_onWidgetReady = () => {
if (WidgetType.JITSI.matches(this.props.app.type)) {
this._sgWidget.widgetApi.transport.send(ElementWidgetActions.ClientReady, {});
}