From d14ccd0492cb3d499a028452c1d26e8f7330b4d3 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 15 Mar 2024 21:18:15 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=8F=91=E9=80=81=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ChatHistory.jsx | 6 +++--- src/views/Conversations/Components/MessagesList.jsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/ChatHistory.jsx b/src/views/ChatHistory.jsx index 21779a2..1455452 100644 --- a/src/views/ChatHistory.jsx +++ b/src/views/ChatHistory.jsx @@ -208,7 +208,7 @@ function ChatHistory() { return () => {}; }, [formValues]); - const RenderText = memo(function renderText({ str }) { + const RenderText = memo(function renderText({ str, className }) { const parts = str.split(/(https?:\/\/[^\s]+|\p{Emoji_Presentation})/gmu).filter((s) => s !== ''); const links = str.match(/https?:\/\/[\S]+/gi) || []; const emojis = str.match(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g) || []; @@ -224,7 +224,7 @@ function ChatHistory() { return prev; }, []); return ( - + {(objArr || []).map((part, index) => { if (part.type === 'link') { return ( @@ -335,7 +335,7 @@ function ChatHistory() { onTitleClick={() => handlePreview(message)} notch={false} title={message.whatsapp_msg_type === 'text' ? '' : message.title} - text={} + text={} copiableDate={true} dateString={message.dateString || message.localDate} className={[ diff --git a/src/views/Conversations/Components/MessagesList.jsx b/src/views/Conversations/Components/MessagesList.jsx index a93497b..4e8e18d 100644 --- a/src/views/Conversations/Components/MessagesList.jsx +++ b/src/views/Conversations/Components/MessagesList.jsx @@ -29,7 +29,7 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get useEffect(scrollToBottom, [messages]); - const RenderText = memo(function renderText({ str }) { + const RenderText = memo(function renderText({ str, className }) { const parts = str.split(/(https?:\/\/[^\s]+|\p{Emoji_Presentation})/gmu).filter((s) => s !== ''); const links = str.match(/https?:\/\/[\S]+/gi) || []; const emojis = str.match(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g) || []; @@ -45,7 +45,7 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get return prev; }, []); return ( - + {(objArr || []).map((part, index) => { if (part.type === 'link') { return ( @@ -96,7 +96,7 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get onReplyMessageClick={() => scrollToMessage(message.reply.id)} onOpen={() => handlePreview(message)} onTitleClick={() => handlePreview(message)} - text={} + text={} {...(message.sender === 'me' ? { styles: { backgroundColor: '#ccd4ae' },