mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-03 16:10:05 +00:00
RoomListViewModel: Support primary filters in the view model (#29454)
* Track available filters and expose this info from the vm - Adds a separate hook that tracks the filtered rooms and the available filters. - When secondary filters are added, some of the primary filters will be selectively hidden. So track this info in the vm. * Write tests * Fix typescript error * Fix translation * Explain what a primary filter is
This commit is contained in:
@@ -27,7 +27,7 @@ describe("<RoomList />", () => {
|
||||
|
||||
matrixClient = stubClient();
|
||||
const rooms = Array.from({ length: 10 }, (_, i) => mkRoom(matrixClient, `room${i}`));
|
||||
vm = { rooms, openRoom: jest.fn() };
|
||||
vm = { rooms, openRoom: jest.fn(), primaryFilters: [] };
|
||||
|
||||
// Needed to render a room list cell
|
||||
DMRoomMap.makeShared(matrixClient);
|
||||
|
||||
Reference in New Issue
Block a user