This commit is contained in:
fkwp
2026-04-23 15:47:40 +02:00
parent c1f821ca0f
commit 0abc32b80e
2 changed files with 25 additions and 11 deletions

View File

@@ -73,13 +73,12 @@ export function createHomeserverConnected$(
startWith([client.getSyncState()]),
map(([state]) => state === SyncState.Syncing),
distinctUntilChanged(),
switchMap((isSyncing) =>
{
if (isSyncing || graceMs <= 0) {
return of(isSyncing); // Sofortige Emission (Synchron)
}
return of(false).pipe(delay(graceMs)); // Verzögertes false
} ),
switchMap((isSyncing) => {
if (isSyncing || graceMs <= 0) {
return of(isSyncing);
}
return of(false).pipe(delay(graceMs));
}),
startWith(client.getSyncState() === SyncState.Syncing),
distinctUntilChanged(),
);