Merge pull request #2098 from matrix-org/dbkr/destroy_widget
Destroy non-persistent widgets when switching room
This commit is contained in:
commit
94c7ae2bf5
2 changed files with 4 additions and 3 deletions
|
@ -161,6 +161,8 @@ export default class AppTile extends React.Component {
|
|||
// if it's not remaining on screen, get rid of the PersistedElement container
|
||||
if (!ActiveWidgetStore.getWidgetPersistence(this.props.id)) {
|
||||
ActiveWidgetStore.destroyPersistentWidget();
|
||||
const PersistedElement = sdk.getComponent("elements.PersistedElement");
|
||||
PersistedElement.destroyElement(this._persistKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -437,6 +439,8 @@ export default class AppTile extends React.Component {
|
|||
|
||||
// Force the widget to be non-persistent
|
||||
ActiveWidgetStore.destroyPersistentWidget();
|
||||
const PersistedElement = sdk.getComponent("elements.PersistedElement");
|
||||
PersistedElement.destroyElement(this._persistKey);
|
||||
}
|
||||
|
||||
formatAppTileName() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue