Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2023-06-13 17:08:29 +02:00
parent 24997f1d3a
commit 49786762bf
3 changed files with 7 additions and 7 deletions

View File

@@ -124,10 +124,10 @@ export const ClientProvider: FC<Props> = ({ children }) => {
const onSync = (state: SyncState, _old: SyncState, data: ISyncStateData) => {
setState((currentState) => {
return {
...currentState,
disconnected: isDisconnected(state, data),
};
const disconnected = isDisconnected(state, data);
return disconnected === currentState.disconnected
? currentState
: { ...currentState, disconnected };
});
};
@@ -205,7 +205,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
}
}
};
let clientWithListener;
let clientWithListener: MatrixClient;
init()
.then(({ client, isPasswordlessUser }) => {
clientWithListener = client;