From 3ea3a394e77de93059ed862c5a2dc5686ef5befc Mon Sep 17 00:00:00 2001 From: Beaudan Date: Mon, 5 Aug 2019 16:05:40 +1000 Subject: [PATCH] Only bold the profile name for messages --- ts/components/conversation/ContactName.tsx | 19 +++++++++++++------ ts/components/conversation/Message.tsx | 1 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ts/components/conversation/ContactName.tsx b/ts/components/conversation/ContactName.tsx index 9d40a04ae..d8d02efb2 100644 --- a/ts/components/conversation/ContactName.tsx +++ b/ts/components/conversation/ContactName.tsx @@ -10,20 +10,27 @@ interface Props { profileName?: string; i18n: LocalizerType; module?: string; + boldProfileName?: Boolean; } export class ContactName extends React.Component { public render() { - const { phoneNumber, name, profileName, i18n, module } = this.props; + const { phoneNumber, name, profileName, i18n, module, boldProfileName } = this.props; const prefix = module ? module : 'module-contact-name'; const title = name ? name : phoneNumber; const shouldShowProfile = Boolean(profileName && !name); - const profileElement = shouldShowProfile ? ( - - - - ) : null; + const profileElement = shouldShowProfile ? + (boldProfileName ? ( + + + + ) : ( + + + + )) + : null; return ( diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 2955c26af..c547da4c6 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -312,6 +312,7 @@ export class Message extends React.PureComponent { profileName={authorProfileName} module="module-message__author" i18n={i18n} + boldProfileName={true} /> );