From 503495fdcf23032f57c1f8d98e1271d0adec7015 Mon Sep 17 00:00:00 2001 From: James Acklin Date: Fri, 19 Mar 2021 15:11:11 -0400 Subject: [PATCH] chat: prevent marker text from wrapping --- .../apps/chat/components/ChatMessage.tsx | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 13bab6db49..8f44bf2b77 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -58,7 +58,14 @@ export const DayBreak = ({ when, shimTop = false }: DayBreakProps) => ( mt={shimTop ? '-8px' : '0'} > - + {moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })} @@ -92,7 +99,14 @@ export const UnreadMarker = React.forwardRef( > - + New messages below @@ -370,10 +384,11 @@ export const MessageAuthor = ({ .unix(msg['time-sent'] / 1000) .format(DATESTAMP_FORMAT); const contact = - ( ( (msg.author === window.ship && showOurContact) || - msg.author !== window.ship) && - `~${msg.author}` in contacts - ) ? contacts[`~${msg.author}`] : false; + ((msg.author === window.ship && showOurContact) || + msg.author !== window.ship) && + `~${msg.author}` in contacts + ? contacts[`~${msg.author}`] + : false; const showNickname = useShowNickname(contact); const { hideAvatars } = useSettingsState(selectCalmState); @@ -416,7 +431,7 @@ export const MessageAuthor = ({ contact?.avatar && !hideAvatars ? (