Augment the custom event types and make the dep arrays honest. [skip build]
This commit is contained in:
@@ -362,13 +362,14 @@ export function Space() {
|
||||
// This prevents sub-rooms from appearing both as top-level entries AND nested under parents
|
||||
const globalSubRoomIds = useMemo(() => {
|
||||
const subRoomIds = new Set<string>();
|
||||
mx.getRooms().forEach((room) => {
|
||||
const subRoomsEvent = room.currentState.getStateEvents(StateEvent.PaarrotSubRooms, '');
|
||||
allJoinedRooms.forEach((roomId) => {
|
||||
const room = mx.getRoom(roomId);
|
||||
const subRoomsEvent = room?.currentState.getStateEvents(StateEvent.PaarrotSubRooms, '');
|
||||
const content = subRoomsEvent?.getContent<{ children: string[] }>();
|
||||
content?.children?.forEach((childId: string) => subRoomIds.add(childId));
|
||||
});
|
||||
return subRoomIds;
|
||||
}, [mx, allJoinedRooms, hierarchy]);
|
||||
}, [mx, allJoinedRooms]);
|
||||
|
||||
// Filter hierarchy to exclude sub-rooms (they'll be shown nested under their parent)
|
||||
const filteredHierarchy = useMemo(
|
||||
|
||||
Reference in New Issue
Block a user