review: move setGridMode close to the value it sets
This commit is contained in:
@@ -992,6 +992,13 @@ export function createCallViewModel$(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const gridModeUserSelection$ = new BehaviorSubject<GridMode>("grid");
|
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.
|
* The layout mode of the media tile grid.
|
||||||
*/
|
*/
|
||||||
@@ -1028,10 +1035,6 @@ export function createCallViewModel$(
|
|||||||
"grid",
|
"grid",
|
||||||
);
|
);
|
||||||
|
|
||||||
const setGridMode = (value: GridMode): void => {
|
|
||||||
gridModeUserSelection$.next(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const gridLayoutMedia$: Observable<GridLayoutMedia> = combineLatest(
|
const gridLayoutMedia$: Observable<GridLayoutMedia> = combineLatest(
|
||||||
[grid$, spotlight$],
|
[grid$, spotlight$],
|
||||||
(grid, spotlight) => ({
|
(grid, spotlight) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user