From 4444f404e6700cab76fe0d23d515dbd1272fac9d Mon Sep 17 00:00:00 2001 From: Shinji-Li <1349021570@qq.com> Date: Wed, 17 Jan 2024 15:25:42 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20fix:=20=E4=BF=AE=E5=A4=8D=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E6=83=85=E5=86=B5=E4=B8=8B=20avatar=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: fix: slove avatar meta was not work --- src/ChatItem/index.tsx | 2 +- src/ChatList/ChatListItem.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChatItem/index.tsx b/src/ChatItem/index.tsx index 7e21ab8..670e905 100644 --- a/src/ChatItem/index.tsx +++ b/src/ChatItem/index.tsx @@ -109,7 +109,7 @@ const ChatItem = memo((props) => { if (chatItemRenderConfig?.titleRender === false) return null; const dom = ; return chatItemRenderConfig?.titleRender?.(props, dom) || dom; - }, [time]); + }, [time, avatar]); if (chatItemRenderConfig?.render === false) return null; diff --git a/src/ChatList/ChatListItem.tsx b/src/ChatList/ChatListItem.tsx index f6f8e34..d0218f1 100644 --- a/src/ChatList/ChatListItem.tsx +++ b/src/ChatList/ChatListItem.tsx @@ -230,7 +230,7 @@ const Item = (props: ChatListItemProps) => { /> ); return dom; - }, [props.content, props.loading, props.id, item.updateAt || item.createAt]); + }, [props.content, props.loading, props.id, (item as any).meta, item.updateAt || item.createAt]); if (RenderItem) return <RenderItem key={item.id} {...props} />;