Skip to content

Commit

Permalink
Fix the sticker picker (#7692)
Browse files Browse the repository at this point in the history
* Fix the sticker picker

Don't stop user widgets on room change: they're not room-specific.

Fixes element-hq/element-web#20797

* Use 'userWidget' prop rather than roomId being defined
  • Loading branch information
dbkr committed Feb 1, 2022
1 parent 98c5f50 commit 5b99930
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/views/elements/AppTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ export default class AppTile extends React.Component<IProps, IState> {
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();
Expand Down

0 comments on commit 5b99930

Please sign in to comment.