mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-02 19:49:23 +00:00
Ensure landscape layout is always edge-to-edge on mobile
The spotlight landscape layout was edge-to-edge previously, and should remain that way.
This commit is contained in:
@@ -1070,10 +1070,12 @@ export function createCallViewModel$(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const spotlightLandscapeLayoutMedia$: Observable<SpotlightLandscapeLayoutMedia> =
|
const spotlightLandscapeLayoutMedia$ = (
|
||||||
|
edgeToEdge: boolean,
|
||||||
|
): Observable<SpotlightLandscapeLayoutMedia> =>
|
||||||
combineLatest([grid$, spotlight$], (grid, spotlight) => ({
|
combineLatest([grid$, spotlight$], (grid, spotlight) => ({
|
||||||
type: "spotlight-landscape",
|
type: "spotlight-landscape",
|
||||||
edgeToEdge: false,
|
edgeToEdge,
|
||||||
spotlight,
|
spotlight,
|
||||||
grid,
|
grid,
|
||||||
}));
|
}));
|
||||||
@@ -1208,7 +1210,7 @@ export function createCallViewModel$(
|
|||||||
switchMap((expanded) =>
|
switchMap((expanded) =>
|
||||||
expanded
|
expanded
|
||||||
? spotlightExpandedLayoutMedia$(false)
|
? spotlightExpandedLayoutMedia$(false)
|
||||||
: spotlightLandscapeLayoutMedia$,
|
: spotlightLandscapeLayoutMedia$(false),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1234,7 +1236,7 @@ export function createCallViewModel$(
|
|||||||
case "grid":
|
case "grid":
|
||||||
// Yes, grid mode actually gets you a "spotlight" layout in
|
// Yes, grid mode actually gets you a "spotlight" layout in
|
||||||
// this window mode.
|
// this window mode.
|
||||||
return spotlightLandscapeLayoutMedia$;
|
return spotlightLandscapeLayoutMedia$(true);
|
||||||
case "spotlight":
|
case "spotlight":
|
||||||
return spotlightExpandedLayoutMedia$(true);
|
return spotlightExpandedLayoutMedia$(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export interface GridLayoutMedia {
|
|||||||
|
|
||||||
export interface SpotlightLandscapeLayoutMedia {
|
export interface SpotlightLandscapeLayoutMedia {
|
||||||
type: "spotlight-landscape";
|
type: "spotlight-landscape";
|
||||||
edgeToEdge: false;
|
edgeToEdge: boolean;
|
||||||
spotlight: MediaViewModel[];
|
spotlight: MediaViewModel[];
|
||||||
grid: UserMediaViewModel[];
|
grid: UserMediaViewModel[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user