feat: hide message preview in convo list item for outgoing requests

pull/3083/head
William Grant 11 months ago
parent d74edc5b24
commit 8ae6dabfd1

@ -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 <InteractionItem conversationId={conversationId} lastMessage={lastMessage} />;
}

Loading…
Cancel
Save