From 8ae6dabfd1929df9e60c4418151791ae961924fb Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 6 May 2024 15:54:01 +1000 Subject: [PATCH] feat: hide message preview in convo list item for outgoing requests --- .../leftpane/conversation-list-item/MessageItem.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ts/components/leftpane/conversation-list-item/MessageItem.tsx b/ts/components/leftpane/conversation-list-item/MessageItem.tsx index 64e175b66..874e7a716 100644 --- a/ts/components/leftpane/conversation-list-item/MessageItem.tsx +++ b/ts/components/leftpane/conversation-list-item/MessageItem.tsx @@ -5,6 +5,7 @@ import { useSelector } from 'react-redux'; import { useConvoIdFromContext } from '../../../contexts/ConvoIdContext'; import { useHasUnread, + useIsOutgoingRequest, useIsPrivate, useIsTyping, useLastMessage, @@ -26,9 +27,14 @@ export const MessageItem = () => { const hasUnread = useHasUnread(conversationId); const isConvoTyping = useIsTyping(conversationId); const isMessageRequest = useSelector(getIsMessageRequestOverlayShown); + const isOutgoingRequest = useIsOutgoingRequest(conversationId); const isSearchingMode = useSelector(isSearching); + if (isOutgoingRequest) { + return null; + } + if (lastMessage?.interactionType && lastMessage?.interactionStatus) { return ; }