Fix race conditions around threads (#8448)
This commit is contained in:
parent
1aaaad2f32
commit
f29ef04751
8 changed files with 37 additions and 67 deletions
|
@ -31,10 +31,8 @@ export class ThreadsRoomNotificationState extends NotificationState implements I
|
|||
|
||||
constructor(public readonly room: Room) {
|
||||
super();
|
||||
if (this.room?.threads) {
|
||||
for (const [, thread] of this.room.threads) {
|
||||
this.onNewThread(thread);
|
||||
}
|
||||
for (const thread of this.room.getThreads()) {
|
||||
this.onNewThread(thread);
|
||||
}
|
||||
this.room.on(ThreadEvent.New, this.onNewThread);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue