Merge branch 'toger5/connectionLostBanner' into connectionlostbanner_lk

NB. I had to more or less rewrite this as it had been refactored in the livekit branch.
This commit is contained in:
David Baker
2023-07-21 20:03:37 +01:00
7 changed files with 137 additions and 6 deletions

View File

@@ -60,11 +60,11 @@ function waitForSync(client: MatrixClient) {
data?: ISyncStateData
) => {
if (state === "PREPARED") {
client.removeListener(ClientEvent.Sync, onSync);
resolve();
client.removeListener(ClientEvent.Sync, onSync);
} else if (state === "ERROR") {
reject(data?.error);
client.removeListener(ClientEvent.Sync, onSync);
reject(data?.error);
}
};
client.on(ClientEvent.Sync, onSync);