From 5b6d0d25f533dd3622dd7d3ae60739835230a680 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 3 Feb 2022 16:02:25 +1100 Subject: [PATCH] fix typo noteSelf results and shortened pubkey for unknown contacts --- stylesheets/_modules.scss | 2 +- stylesheets/_session.scss | 2 +- ts/components/conversation/ContactName.tsx | 4 ++-- ts/components/search/MessageSearchResults.tsx | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index 99345556b..f45ffd83e 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -348,7 +348,7 @@ min-width: 0; font-size: 16px; line-height: 24px; - font-weight: 300; + font-weight: 400; color: var(--color-text); // width of avatar (28px) and our 6px left margin diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index e6cf61bfc..e89ee0a22 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -277,7 +277,7 @@ textarea { &-text { @include session-color-subtle(var(--color-text)); - font-weight: 300; + font-weight: 400; font-size: $session-font-sm; line-height: $session-font-sm; } diff --git a/ts/components/conversation/ContactName.tsx b/ts/components/conversation/ContactName.tsx index 0994336dc..43b8868ba 100644 --- a/ts/components/conversation/ContactName.tsx +++ b/ts/components/conversation/ContactName.tsx @@ -2,7 +2,7 @@ import React from 'react'; import classNames from 'classnames'; import { Emojify } from './Emojify'; -import { useConversationUsername } from '../../hooks/useParamSelector'; +import { useConversationUsernameOrShorten } from '../../hooks/useParamSelector'; type Props = { pubkey: string; @@ -18,7 +18,7 @@ export const ContactName = (props: Props) => { const { pubkey, name, profileName, module, boldProfileName, compact, shouldShowPubkey } = props; const prefix = module ? module : 'module-contact-name'; - const convoName = useConversationUsername(pubkey); + const convoName = useConversationUsernameOrShorten(pubkey); const shouldShowProfile = Boolean(convoName || profileName || name); const styles = (boldProfileName diff --git a/ts/components/search/MessageSearchResults.tsx b/ts/components/search/MessageSearchResults.tsx index 98ca54cc9..926dbf32b 100644 --- a/ts/components/search/MessageSearchResults.tsx +++ b/ts/components/search/MessageSearchResults.tsx @@ -101,7 +101,7 @@ const ConversationHeader = (props: { source: string; conversationId: string }) = return ( - + ); @@ -109,7 +109,7 @@ const ConversationHeader = (props: { source: string; conversationId: string }) = return ( - ; + ); }; @@ -203,6 +203,7 @@ export const MessageSearchResult = (props: MessageResultProps) => { if (!source && !destination) { return null; } + // tslint:disable: use-simple-attributes return (