From c612014936df3df51e2ee9fbf85bd169cfbca701 Mon Sep 17 00:00:00 2001 From: Germain Date: Mon, 17 Jan 2022 14:54:19 +0000 Subject: [PATCH] Fix ThreadsRoomNotificationState listeners removal on destroy (#7558) --- src/stores/notifications/ThreadsRoomNotificationState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/notifications/ThreadsRoomNotificationState.ts b/src/stores/notifications/ThreadsRoomNotificationState.ts index 9c520873e0..6129f141c5 100644 --- a/src/stores/notifications/ThreadsRoomNotificationState.ts +++ b/src/stores/notifications/ThreadsRoomNotificationState.ts @@ -41,7 +41,7 @@ export class ThreadsRoomNotificationState extends NotificationState implements I public destroy(): void { super.destroy(); - this.room.on(ThreadEvent.New, this.onNewThread); + this.room.off(ThreadEvent.New, this.onNewThread); for (const [, notificationState] of this.threadsState) { notificationState.off(NotificationStateEvents.Update, this.onThreadUpdate); }