Merge pull request #695 from vector-im/dbkr/fix_missing_tile_bug
Fix missing tile bug
This commit is contained in:
commit
2346ad9b7e
2 changed files with 8 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ export interface UseGroupCallReturnType {
|
||||||
requestingScreenshare: boolean;
|
requestingScreenshare: boolean;
|
||||||
isScreensharing: boolean;
|
isScreensharing: boolean;
|
||||||
screenshareFeeds: CallFeed[];
|
screenshareFeeds: CallFeed[];
|
||||||
localDesktopCapturerSourceId: string;
|
localDesktopCapturerSourceId: string; // XXX: This looks unused?
|
||||||
participants: RoomMember[];
|
participants: RoomMember[];
|
||||||
hasLocalParticipant: boolean;
|
hasLocalParticipant: boolean;
|
||||||
unencryptedEventsFromUsers: Set<string>;
|
unencryptedEventsFromUsers: Set<string>;
|
||||||
|
|
|
||||||
|
|
@ -654,9 +654,16 @@ function getSubGridPositions(
|
||||||
// Sets the 'order' property on tiles based on the layout param and
|
// Sets the 'order' property on tiles based on the layout param and
|
||||||
// other properties of the tiles, eg. 'focused' and 'presenter'
|
// other properties of the tiles, eg. 'focused' and 'presenter'
|
||||||
function reorderTiles(tiles: Tile[], layout: Layout) {
|
function reorderTiles(tiles: Tile[], layout: Layout) {
|
||||||
|
// We use a special layout for 1:1 to always put the local tile first.
|
||||||
|
// We only do this if there are two tiles (obviously) and exactly one
|
||||||
|
// of them is local: during startup we can have tiles from other users
|
||||||
|
// but not our own, due to the order they're added, so without this we
|
||||||
|
// can assign multiple remote tiles order '1' and this persists through
|
||||||
|
// subsequent reorders because we preserve the order of the tiles.
|
||||||
if (
|
if (
|
||||||
layout === "freedom" &&
|
layout === "freedom" &&
|
||||||
tiles.length === 2 &&
|
tiles.length === 2 &&
|
||||||
|
tiles.filter((t) => t.item.isLocal).length === 1 &&
|
||||||
!tiles.some((t) => t.presenter || t.focused)
|
!tiles.some((t) => t.presenter || t.focused)
|
||||||
) {
|
) {
|
||||||
// 1:1 layout
|
// 1:1 layout
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue