mirror of https://github.com/vector-im/riot-web
Fix some regressions
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
0df67d005e
commit
459e028137
|
@ -146,7 +146,7 @@ export default class AppTile extends React.Component<IProps, IState> {
|
|||
return {
|
||||
initialising: true, // True while we are mangling the widget URL
|
||||
// True while the iframe content is loading
|
||||
loading: this.props.waitForIframeLoad,
|
||||
loading: this.props.waitForIframeLoad && !PersistedElement.isMounted(this.persistKey),
|
||||
// Assume that widget has permission to load if we are the user who
|
||||
// added it to the room, or if explicitly granted by the user
|
||||
hasPermissionToLoad: this.hasPermissionToLoad(newProps),
|
||||
|
@ -247,6 +247,12 @@ export default class AppTile extends React.Component<IProps, IState> {
|
|||
this.resetWidget(nextProps);
|
||||
}
|
||||
}
|
||||
|
||||
if (nextProps.widgetPageTitle !== this.props.widgetPageTitle) {
|
||||
this.setState({
|
||||
widgetPageTitle: nextProps.widgetPageTitle,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -104,6 +104,10 @@ export default class PersistedElement extends React.Component<IProps> {
|
|||
}
|
||||
}
|
||||
|
||||
static isMounted(persistKey) {
|
||||
return Boolean(getContainer('mx_persistedElement_' + persistKey));
|
||||
}
|
||||
|
||||
private collectChildContainer = (ref: HTMLDivElement): void => {
|
||||
if (this.childContainer) {
|
||||
this.resizeObserver.unobserve(this.childContainer);
|
||||
|
|
Loading…
Reference in New Issue