From 5b999300b26118f90da7c68d6230d2a97dfe1dd2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 1 Feb 2022 15:34:22 +0000 Subject: [PATCH] Fix the sticker picker (#7692) * 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 --- src/components/views/elements/AppTile.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index 9327b0b50e..de5cd67301 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -179,7 +179,8 @@ export default class AppTile extends React.Component { if (this.props.room.roomId == RoomViewStore.getRoomId()) return; const app = this.props.app; 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); PersistedElement.destroyElement(this.persistKey); this.sgWidget?.stopMessaging();