mirror of https://github.com/vector-im/riot-web
Fix ThreadsRoomNotificationState listeners removal on destroy (#7558)
parent
4028b5ef2e
commit
c612014936
|
@ -41,7 +41,7 @@ export class ThreadsRoomNotificationState extends NotificationState implements I
|
||||||
|
|
||||||
public destroy(): void {
|
public destroy(): void {
|
||||||
super.destroy();
|
super.destroy();
|
||||||
this.room.on(ThreadEvent.New, this.onNewThread);
|
this.room.off(ThreadEvent.New, this.onNewThread);
|
||||||
for (const [, notificationState] of this.threadsState) {
|
for (const [, notificationState] of this.threadsState) {
|
||||||
notificationState.off(NotificationStateEvents.Update, this.onThreadUpdate);
|
notificationState.off(NotificationStateEvents.Update, this.onThreadUpdate);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue