Connection lost banner (#1101)

* connection lost banner
if there is no connection to the home server

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo
2023-06-19 15:36:03 +02:00
committed by GitHub
parent cabad628b4
commit 2ffe000bf5
7 changed files with 130 additions and 5 deletions

View File

@@ -61,11 +61,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);