refactor(realtime): solve circle dependencies in realtime-user-status-adapter.ts

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-14 13:16:39 +02:00
parent 8cd93918e2
commit e3a3690b58
5 changed files with 259 additions and 191 deletions

View file

@ -50,7 +50,11 @@ export class RealtimeConnection {
this.realtimeUserStateAdapter = new RealtimeUserStatusAdapter(
this.user?.username ?? null,
this.getDisplayName(),
this,
() =>
this.realtimeNote
.getConnections()
.map((connection) => connection.getRealtimeUserStateAdapter()),
this.getTransporter(),
() => acceptEdits,
);
}