* Fix the sticker picker Don't stop user widgets on room change: they're not room-specific. Fixes https://github.com/vector-im/element-web/issues/20797 * Use 'userWidget' prop rather than roomId being defined
This commit is contained in:
parent
6c16a2c9dd
commit
806cd264df
1 changed files with 2 additions and 1 deletions
|
@ -179,7 +179,8 @@ export default class AppTile extends React.Component<IProps, IState> {
|
||||||
if (this.props.room.roomId == RoomViewStore.getRoomId()) return;
|
if (this.props.room.roomId == RoomViewStore.getRoomId()) return;
|
||||||
const app = this.props.app;
|
const app = this.props.app;
|
||||||
const isActiveWidget = ActiveWidgetStore.instance.getWidgetPersistence(app.id);
|
const isActiveWidget = ActiveWidgetStore.instance.getWidgetPersistence(app.id);
|
||||||
if (!isActiveWidget) {
|
// Stop the widget if it's not the active (persistent) widget and it's not a user widget
|
||||||
|
if (!isActiveWidget && !this.props.userWidget) {
|
||||||
ActiveWidgetStore.instance.destroyPersistentWidget(app.id);
|
ActiveWidgetStore.instance.destroyPersistentWidget(app.id);
|
||||||
PersistedElement.destroyElement(this.persistKey);
|
PersistedElement.destroyElement(this.persistKey);
|
||||||
this.sgWidget?.stopMessaging();
|
this.sgWidget?.stopMessaging();
|
||||||
|
|
Loading…
Reference in a new issue