Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Weblate 2018-08-17 08:53:46 +00:00
commit 32294165f0
2 changed files with 4 additions and 3 deletions

View File

@ -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() {

View File

@ -17,7 +17,6 @@ limitations under the License.
import EventEmitter from 'events';
import MatrixClientPeg from '../MatrixClientPeg';
import sdk from '../index';
/**
* Stores information about the widgets active in the app right now:
@ -75,8 +74,6 @@ class ActiveWidgetStore extends EventEmitter {
destroyPersistentWidget() {
const toDeleteId = this._persistentWidgetId;
const PersistedElement = sdk.getComponent("elements.PersistedElement");
PersistedElement.destroyElement('widget_' + toDeleteId);
this.setWidgetPersistence(toDeleteId, false);
this.delWidgetMessaging(toDeleteId);
this.delWidgetCapabilities(toDeleteId);