From e69fc1250ffdeab1fb6e44474b59005bbc10823d Mon Sep 17 00:00:00 2001 From: Kace Cottam Date: Tue, 17 Mar 2026 13:04:09 -0700 Subject: [PATCH] another lint check --- src/app/features/space-nav/SpaceNavItem.tsx | 1 - src/app/pages/client/space/Space.tsx | 20 ++++++++++++++------ src/app/utils/colorMXID.ts | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/app/features/space-nav/SpaceNavItem.tsx b/src/app/features/space-nav/SpaceNavItem.tsx index ad7fe101..f319a9da 100644 --- a/src/app/features/space-nav/SpaceNavItem.tsx +++ b/src/app/features/space-nav/SpaceNavItem.tsx @@ -1,7 +1,6 @@ import { MouseEventHandler, useState } from 'react'; import { Room } from '$types/matrix-sdk'; import { Box, Icon, Icons, Text, config, RectCords, Avatar } from 'folds'; -import { useFocusWithin, useHover } from 'react-aria'; import { useNavigate } from 'react-router-dom'; import { NavButton, NavItem, NavItemContent } from '$components/nav'; import { useRoomName } from '$hooks/useRoomMeta'; diff --git a/src/app/pages/client/space/Space.tsx b/src/app/pages/client/space/Space.tsx index 29786326..4eb7b117 100644 --- a/src/app/pages/client/space/Space.tsx +++ b/src/app/pages/client/space/Space.tsx @@ -560,13 +560,13 @@ export function Space() { return; } // for nearly root level text/call rooms, we will not be drawing any arcs. - if (renderDepth == DEPTH_START - 1 && !room?.isSpaceRoom() && connectorStack.length == 0) { + if (renderDepth === DEPTH_START - 1 && !room?.isSpaceRoom() && connectorStack.length === 0) { return; } // for the sub-root items, we will not draw any arcs from root to it. // however, we should capture the aX and aY to draw starter arcs for next depths. - if (renderDepth == DEPTH_START) { + if (renderDepth === DEPTH_START) { connectorStack = [ { aX: PADDING_LEFT_DEPTH_OFFSET * DEPTH_START + PADDING_LEFT_DEPTH_OFFSET_START, @@ -576,12 +576,12 @@ export function Space() { return; } // adjust the stack to be at the correct depth, which is the "parent" of the current item. - while (connectorStack.length + DEPTH_START > renderDepth && connectorStack.length != 0) { + while (connectorStack.length + DEPTH_START > renderDepth && connectorStack.length !== 0) { connectorStack.pop(); } // Fixes crash in case the top level virtual item is unrendered. - if (connectorStack.length == 0) { + if (connectorStack.length === 0) { connectorStack = [{ aX: Math.round(renderDepth * PADDING_LEFT_DEPTH_OFFSET), aY: 0 }]; } @@ -654,7 +654,15 @@ export function Space() { hasUnread || roomId === selectedRoomId || callEmbed?.roomId === roomId; return containsShowRoom || !showRoomAnyway; }, - [getContainsShowRoom, getInClosedCategories, space.roomId, callEmbed, subspaceHierarchyLimit] + [ + getContainsShowRoom, + getInClosedCategories, + space.roomId, + callEmbed, + subspaceHierarchyLimit, + roomToUnread, + selectedRoomId, + ] ), useCallback( (sId) => getInClosedCategories(space.roomId, sId), @@ -760,7 +768,7 @@ export function Space() { const room = mx.getRoom(roomId); const renderDepth = room?.isSpaceRoom() ? depth - 2 : depth - 1; if (!room) return null; - if (depth == subspaceHierarchyLimit && room.isSpaceRoom()) { + if (depth === subspaceHierarchyLimit && room.isSpaceRoom()) { return (