From 16311deee34a4b4ef2eb13920d82438be100d900 Mon Sep 17 00:00:00 2001 From: James Acklin Date: Thu, 27 May 2021 16:28:39 -0400 Subject: [PATCH] messages: fixing mono-logic fixes urbit/landscape#623 --- .../src/views/landscape/components/ResourceSkeleton.tsx | 4 ++-- .../src/views/landscape/components/Sidebar/SidebarItem.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/ResourceSkeleton.tsx b/pkg/interface/src/views/landscape/components/ResourceSkeleton.tsx index c15419791e..b58f4f7cb4 100644 --- a/pkg/interface/src/views/landscape/components/ResourceSkeleton.tsx +++ b/pkg/interface/src/views/landscape/components/ResourceSkeleton.tsx @@ -25,8 +25,8 @@ const participantNames = (str: string, contacts, hideNicknames) => { if (_.includes(str, ',') && _.startsWith(str, '~')) { const names = _.split(str, ', '); return names.map((name, idx) => { - if (urbitOb.isValidPatp(name) && !hideNicknames) { - if (contacts[name]?.nickname) + if (urbitOb.isValidPatp(name)) { + if (contacts[name]?.nickname && !hideNicknames) return ( {contacts[name]?.nickname} diff --git a/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx b/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx index 5d14d67e31..793149b287 100644 --- a/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx +++ b/pkg/interface/src/views/landscape/components/Sidebar/SidebarItem.tsx @@ -104,8 +104,8 @@ export function SidebarItem(props: { if (_.includes(str, ',') && _.startsWith(str, '~')) { const names = _.split(str, ', '); return names.map((name, idx) => { - if (urbitOb.isValidPatp(name) && !hideNicknames) { - if (contacts[name]?.nickname) + if (urbitOb.isValidPatp(name)) { + if (contacts[name]?.nickname && !hideNicknames) return ( {contacts[name]?.nickname}