move startWith to corresponding switchMap branch

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
fkwp
2026-04-30 20:36:29 +02:00
parent af66f4b8b5
commit a380171d05

View File

@@ -77,9 +77,8 @@ export function createHomeserverConnected$(
if (isSyncing || graceMs <= 0) {
return of(isSyncing);
}
return of(false).pipe(delay(graceMs));
return of(false).pipe(delay(graceMs), startWith(true));
}),
startWith(client.getSyncState() === SyncState.Syncing),
distinctUntilChanged(),
);