Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Destroy non-persistent widgets when switching room #2098

Merged
merged 2 commits into from
Aug 17, 2018
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Aug 1, 2018

@dbkr dbkr requested a review from a team August 1, 2018 14:04
@@ -75,8 +75,6 @@ class ActiveWidgetStore extends EventEmitter {
destroyPersistentWidget() {
const toDeleteId = this._persistentWidgetId;

const PersistedElement = sdk.getComponent("elements.PersistedElement");
PersistedElement.destroyElement('widget_' + toDeleteId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this didn't work? Seemed like a better place to do it...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'cos it was trying to destroy the one current persistent widget, but in the case of a jitsi widget which got mounted because you were in its room but never became persistent, it wouldn't destroy anything. The subtle difference is tearing down the current persistent widget vs tearing down the widget in the current view which has been mounted in a persisted element.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it 👍

@bwindels
Copy link
Contributor

bwindels commented Aug 6, 2018

@dbkr Some lint errors remaining

@dbkr dbkr merged commit 94c7ae2 into develop Aug 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants