From 806cd264dfb3267269fcb588fa3cbfd9117f9f08 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 1 Feb 2022 15:40:50 +0000 Subject: [PATCH] Fix the sticker picker (#7692) (#7695) * 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 8b61d0d764..758270344b 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();