review: move setGridMode close to the value it sets

This commit is contained in:
Valere
2025-12-01 15:25:17 +01:00
parent 1ff479a315
commit b7fc86ee06

View File

@@ -992,6 +992,13 @@ export function createCallViewModel$(
);
const gridModeUserSelection$ = new BehaviorSubject<GridMode>("grid");
// Callback to set the grid mode desired by the user.
// Notice that this is only a preference, the actual grid mode can be overridden
// if there is a remote screen share active.
const setGridMode = (value: GridMode): void => {
gridModeUserSelection$.next(value);
};
/**
* The layout mode of the media tile grid.
*/
@@ -1028,10 +1035,6 @@ export function createCallViewModel$(
"grid",
);
const setGridMode = (value: GridMode): void => {
gridModeUserSelection$.next(value);
};
const gridLayoutMedia$: Observable<GridLayoutMedia> = combineLatest(
[grid$, spotlight$],
(grid, spotlight) => ({