Merge branch 'develop' into travis/openid-widget

This commit is contained in:
Travis Ralston 2019-03-23 22:48:12 -06:00
commit d3268801ed
34 changed files with 717 additions and 133 deletions

View file

@ -336,9 +336,14 @@ export default class AppTile extends React.Component {
* Called when widget iframe has finished loading
*/
_onLoaded() {
if (!ActiveWidgetStore.getWidgetMessaging(this.props.id)) {
this._setupWidgetMessaging();
// Destroy the old widget messaging before starting it back up again. Some widgets
// have startup routines that run when they are loaded, so we just need to reinitialize
// the messaging for them.
if (ActiveWidgetStore.getWidgetMessaging(this.props.id)) {
ActiveWidgetStore.delWidgetMessaging(this.props.id);
}
this._setupWidgetMessaging();
ActiveWidgetStore.setRoomId(this.props.id, this.props.room.roomId);
this.setState({loading: false});
}