mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-04 05:37:22 +00:00
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");
|
||||
|
||||
// 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) => ({
|
||||
|
||||
Reference in New Issue
Block a user