Fix ThreadsRoomNotificationState listeners removal on destroy (#7558)

pull/21833/head
Germain 2022-01-17 14:54:19 +00:00 committed by GitHub
parent 4028b5ef2e
commit c612014936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}