From 6a579e50ed13565bbc3a2bc5629ef114d2ab825c Mon Sep 17 00:00:00 2001 From: mlogclub Date: Sat, 2 May 2026 13:16:42 +0800 Subject: [PATCH] fix(conversation): update dependency on conversation ID for effect hooks --- web/app/dashboard/conversations/_components/chat-panel.tsx | 2 +- web/components/kefu/chat-shell.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/dashboard/conversations/_components/chat-panel.tsx b/web/app/dashboard/conversations/_components/chat-panel.tsx index 7a93853..119d81c 100644 --- a/web/app/dashboard/conversations/_components/chat-panel.tsx +++ b/web/app/dashboard/conversations/_components/chat-panel.tsx @@ -173,7 +173,7 @@ export function ChatPanel() { toast.error(error instanceof Error ? error.message : "设置已读失败"); }); }, [ - conversation, + conversation?.id, getViewport, isNearBottom, loading, diff --git a/web/components/kefu/chat-shell.tsx b/web/components/kefu/chat-shell.tsx index 2aab1a0..8949455 100644 --- a/web/components/kefu/chat-shell.tsx +++ b/web/components/kefu/chat-shell.tsx @@ -137,7 +137,7 @@ export function KefuChatShell() { void markConversationRead().catch((readError) => { console.error("Failed to mark kefu conversation read", readError) }) - }, [conversation, isVisible, markConversationRead]) + }, [conversation?.id, isVisible, markConversationRead]) useEffect(() => { return bindKefuHostBridge({