From cabf4ecca14b342d5256057c43af0c3da861d87a Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 20 Jul 2022 01:32:09 -0400 Subject: [PATCH] Fix furni infostand --- .../room/widgets/avatar-info/AvatarInfoWidgetView.tsx | 2 ++ src/hooks/rooms/widgets/useAvatarInfoWidget.ts | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/room/widgets/avatar-info/AvatarInfoWidgetView.tsx b/src/components/room/widgets/avatar-info/AvatarInfoWidgetView.tsx index 23518705..133af260 100644 --- a/src/components/room/widgets/avatar-info/AvatarInfoWidgetView.tsx +++ b/src/components/room/widgets/avatar-info/AvatarInfoWidgetView.tsx @@ -60,6 +60,8 @@ export const AvatarInfoWidgetView: FC<{}> = props => case AvatarInfoFurni.FURNI: { const info = (avatarInfo as AvatarInfoFurni); + if(!isDecorating) return null; + return setAvatarInfo(null) } />; } case AvatarInfoUser.OWN_USER: diff --git a/src/hooks/rooms/widgets/useAvatarInfoWidget.ts b/src/hooks/rooms/widgets/useAvatarInfoWidget.ts index 1da7c790..a8545404 100644 --- a/src/hooks/rooms/widgets/useAvatarInfoWidget.ts +++ b/src/hooks/rooms/widgets/useAvatarInfoWidget.ts @@ -68,8 +68,6 @@ const useAvatarInfoWidgetState = () => { case RoomObjectCategory.FLOOR: case RoomObjectCategory.WALL: - if(!isDecorating) break; - info = AvatarInfoUtilities.getFurniInfo(objectId, category) break; case RoomObjectCategory.UNIT: { @@ -282,7 +280,7 @@ const useAvatarInfoWidgetState = () => useObjectRollOutEvent(event => { - if(!activeNameBubble || (activeNameBubble.roomIndex !== event.id)) return; + if(!activeNameBubble || (event.category !== RoomObjectCategory.UNIT) || (activeNameBubble.roomIndex !== event.id)) return; setActiveNameBubble(null); });