improve function naming

This commit is contained in:
Gimle Larpes 2025-07-27 16:33:49 +02:00
parent b4d7f520c5
commit df8ba32725

View file

@ -204,7 +204,7 @@ const getSpaceJoinedHierarchy = (
* @param spaceId - The space ID to check. * @param spaceId - The space ID to check.
* @returns True if the space or any descendant contains non-space rooms. * @returns True if the space or any descendant contains non-space rooms.
*/ */
const containsRoom = (spaceId: string) => { const getContainsRoom = (spaceId: string) => {
const space = getRoom(spaceId); const space = getRoom(spaceId);
if (!space) return false; if (!space) return false;
@ -217,7 +217,7 @@ const getSpaceJoinedHierarchy = (
if (!room) return false; if (!room) return false;
if (!room.isSpaceRoom()) return true; if (!room.isSpaceRoom()) return true;
return containsRoom(childId); return getContainsRoom(childId);
}); });
}; };
@ -236,7 +236,7 @@ const getSpaceJoinedHierarchy = (
return true; return true;
}); });
if (!containsRoom(spaceItem.roomId)) return []; if (!getContainsRoom(spaceItem.roomId)) return [];
const childItems: HierarchyItemRoom[] = []; const childItems: HierarchyItemRoom[] = [];
joinedRoomEvents.forEach((childEvent) => { joinedRoomEvents.forEach((childEvent) => {