move starWith to corresponding branch in switchMap

This commit is contained in:
fkwp
2026-04-30 20:50:45 +02:00
parent 39ef815d8b
commit 24c2845958

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(),
);