From 4414fe3c8243021f733c5265c1fde1551e32a75b Mon Sep 17 00:00:00 2001 From: Timo K Date: Mon, 17 Nov 2025 14:39:24 +0100 Subject: [PATCH] remove all `/*PUBLIC*/` --- src/state/CallViewModel/CallViewModel.ts | 44 +++++++++++------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/state/CallViewModel/CallViewModel.ts b/src/state/CallViewModel/CallViewModel.ts index 0fd71d3d..3e3d8190 100644 --- a/src/state/CallViewModel/CallViewModel.ts +++ b/src/state/CallViewModel/CallViewModel.ts @@ -469,10 +469,10 @@ export class CallViewModel { // down, for example, and we want to avoid making people worry that the app is // in a split-brained state. // DISCUSSION own membership manager ALSO this probably can be simplifis - /*PUBLIC*/ const reconnecting$ = localMembership.reconnecting$; + const reconnecting$ = localMembership.reconnecting$; const pretendToBeDisconnected$ = reconnecting$; - /*PUBLIC*/ const audioParticipants$ = scope.behavior( + const audioParticipants$ = scope.behavior( matrixLivekitMembers$.pipe( switchMap((membersWithEpoch) => { const members = membersWithEpoch.value; @@ -518,11 +518,11 @@ export class CallViewModel { [], ); - /*PUBLIC*/ const handsRaised$ = scope.behavior( + const handsRaised$ = scope.behavior( handsRaisedSubject$.pipe(pauseWhen(pretendToBeDisconnected$)), ); - /*PUBLIC*/ const reactions$ = scope.behavior( + const reactions$ = scope.behavior( reactionsSubject$.pipe( map((v) => Object.fromEntries( @@ -663,7 +663,7 @@ export class CallViewModel { ), ); - /*PUBLIC*/ const joinSoundEffect$ = userMedia$.pipe( + const joinSoundEffect$ = userMedia$.pipe( pairwise(), filter( ([prev, current]) => @@ -681,16 +681,16 @@ export class CallViewModel { * - There can be multiple participants for one Matrix user if they join from * multiple devices. */ - /*PUBLIC*/ const participantCount$ = scope.behavior( + const participantCount$ = scope.behavior( matrixLivekitMembers$.pipe(map((ms) => ms.value.length)), ); // only public to expose to the view. // TODO if we are in "unknown" state we need a loading rendering (or empty screen) // Otherwise it looks like we already connected and only than the ringing starts which is weird. - /*PUBLIC*/ const callPickupState$ = callLifecycle.callPickupState$; + const callPickupState$ = callLifecycle.callPickupState$; - /*PUBLIC*/ const leaveSoundEffect$ = combineLatest([ + const leaveSoundEffect$ = combineLatest([ callLifecycle.callPickupState$, userMedia$, ]).pipe( @@ -871,14 +871,14 @@ export class CallViewModel { /** * The general shape of the window. */ - /*PUBLIC*/ const windowMode$ = scope.behavior( + const windowMode$ = scope.behavior( pipEnabled$.pipe( switchMap((pip) => (pip ? of("pip") : naturalWindowMode$)), ), ); const spotlightExpandedToggle$ = new Subject(); - /*PUBLIC*/ const spotlightExpanded$ = scope.behavior( + const spotlightExpanded$ = scope.behavior( spotlightExpandedToggle$.pipe(accumulate(false, (expanded) => !expanded)), ); @@ -886,7 +886,7 @@ export class CallViewModel { /** * The layout mode of the media tile grid. */ - /*PUBLIC*/ const gridMode$ = + const gridMode$ = // If the user hasn't selected spotlight and somebody starts screen sharing, // automatically switch to spotlight mode and reset when screen sharing ends scope.behavior( @@ -909,7 +909,7 @@ export class CallViewModel { "grid", ); - /*PUBLIC*/ const setGridMode = (value: GridMode): void => { + const setGridMode = (value: GridMode): void => { gridModeUserSelection$.next(value); }; @@ -1087,22 +1087,22 @@ export class CallViewModel { /** * The layout of tiles in the call interface. */ - /*PUBLIC*/ const layout$ = scope.behavior( + const layout$ = scope.behavior( layoutInternals$.pipe(map(({ layout }) => layout)), ); /** * The current generation of the tile store, exposed for debugging purposes. */ - /*PUBLIC*/ const tileStoreGeneration$ = scope.behavior( + const tileStoreGeneration$ = scope.behavior( layoutInternals$.pipe(map(({ tiles }) => tiles.generation)), ); - /*PUBLIC*/ const showSpotlightIndicators$ = scope.behavior( + const showSpotlightIndicators$ = scope.behavior( layout$.pipe(map((l) => l.type !== "grid")), ); - /*PUBLIC*/ const showSpeakingIndicators$ = scope.behavior( + const showSpeakingIndicators$ = scope.behavior( layout$.pipe( switchMap((l) => { switch (l.type) { @@ -1130,9 +1130,7 @@ export class CallViewModel { ), ); - /*PUBLIC*/ const toggleSpotlightExpanded$ = scope.behavior< - (() => void) | null - >( + const toggleSpotlightExpanded$ = scope.behavior<(() => void) | null>( windowMode$.pipe( switchMap((mode) => mode === "normal" @@ -1157,11 +1155,11 @@ export class CallViewModel { const screenHover$ = new Subject(); const screenUnhover$ = new Subject(); - /*PUBLIC*/ const showHeader$ = scope.behavior( + const showHeader$ = scope.behavior( windowMode$.pipe(map((mode) => mode !== "pip" && mode !== "flat")), ); - /*PUBLIC*/ const showFooter$ = scope.behavior( + const showFooter$ = scope.behavior( windowMode$.pipe( switchMap((mode) => { switch (mode) { @@ -1219,7 +1217,7 @@ export class CallViewModel { /** * Whether audio is currently being output through the earpiece. */ - /*PUBLIC*/ const earpieceMode$ = scope.behavior( + const earpieceMode$ = scope.behavior( combineLatest( [ mediaDevices.audioOutput.available$, @@ -1237,7 +1235,7 @@ export class CallViewModel { * This will be `null` in case the target does not exist in the list * of available audio outputs. */ - /*PUBLIC*/ const audioOutputSwitcher$ = scope.behavior<{ + const audioOutputSwitcher$ = scope.behavior<{ targetOutput: "earpiece" | "speaker"; switch: () => void; } | null>(