Merge branch 'grid-interactions' into livekit-experiment

This commit is contained in:
Robin Townsend
2023-06-18 11:36:59 -04:00
2 changed files with 32 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ import {
addItems,
tryMoveTile,
resize,
promoteSpeakers,
} from "./model";
import { TileWrapper } from "./TileWrapper";
@@ -99,6 +100,9 @@ const useGridState = (
const newItems = items.filter((i) => !existingItemIds.has(i.id));
const grid3 = addItems(newItems, grid2);
// Step 4: Promote speakers to the top
promoteSpeakers(grid3);
return { ...grid3, generation: prevGrid.generation + 1 };
},
[columns, items]