Only Destroy the expected persistent widget, not *ANY*
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
7b17ea1fa5
commit
cd6a980c7e
2 changed files with 6 additions and 6 deletions
|
@ -67,11 +67,12 @@ class ActiveWidgetStore extends EventEmitter {
|
|||
if (ev.getType() !== 'im.vector.modular.widgets') return;
|
||||
|
||||
if (ev.getStateKey() === this._persistentWidgetId) {
|
||||
this.destroyPersistentWidget();
|
||||
this.destroyPersistentWidget(this._persistentWidgetId);
|
||||
}
|
||||
}
|
||||
|
||||
destroyPersistentWidget() {
|
||||
destroyPersistentWidget(id) {
|
||||
if (id !== this._persistentWidgetId) return;
|
||||
const toDeleteId = this._persistentWidgetId;
|
||||
|
||||
this.setWidgetPersistence(toDeleteId, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue