Show 'reconnecting' message when sync loop is disconnected

With this change I'm also taking care to not show the standard "Connection to the server has been lost" banner in the call view, since that is now covered by the 'reconnecting' message.
This commit is contained in:
Robin
2025-08-20 13:30:21 +02:00
parent 8de6ddceb0
commit 1a1e5a9db8
6 changed files with 66 additions and 19 deletions

View File

@@ -7,6 +7,7 @@ Please see LICENSE in the repository root for full details.
import {
type Observable,
combineLatest,
concat,
defer,
finalize,
@@ -86,3 +87,11 @@ export function getValue<T>(state$: Observable<T>): T {
if (value === nothing) throw new Error("Not a state Observable");
return value;
}
/**
* Creates an Observable that has a value of true whenever all its inputs are
* true.
*/
export function and$(...inputs: Observable<boolean>[]): Observable<boolean> {
return combineLatest(inputs, (...flags) => flags.every((flag) => flag));
}