Properly handle persistent widgets when room is left (#7724)
This commit is contained in:
parent
d72469663d
commit
ec92102fe3
4 changed files with 130 additions and 103 deletions
|
@ -64,9 +64,8 @@ import { arrayFastClone } from "../../utils/arrays";
|
|||
|
||||
interface IAppTileProps {
|
||||
// Note: these are only the props we care about
|
||||
|
||||
app: IWidget;
|
||||
room: Room;
|
||||
room?: Room; // without a room it is a user widget
|
||||
userId: string;
|
||||
creatorUserId: string;
|
||||
waitForIframeLoad: boolean;
|
||||
|
@ -423,6 +422,7 @@ export class StopGapWidget extends EventEmitter {
|
|||
if (!this.started) return;
|
||||
WidgetMessagingStore.instance.stopMessaging(this.mockWidget);
|
||||
ActiveWidgetStore.instance.delRoomId(this.mockWidget.id);
|
||||
this.messaging = null;
|
||||
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().off('event', this.onEvent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue