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 K
2023-06-09 19:18:30 +02:00
parent 062802b3e9
commit 14a32c0fb3
7 changed files with 135 additions and 6 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);