From 484381c6e56d1b24120c42c7af7db740306b70d2 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 19 Oct 2025 15:10:23 +0800 Subject: [PATCH] =?UTF-8?q?local=20const=20=E5=BE=97=E5=88=B0=E7=9A=84=20c?= =?UTF-8?q?hatInfo=20=E8=80=8C=E4=B8=8D=E6=98=AF=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=97=A7=E7=9A=84=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/chat/ChatFragment.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/ui/chat/ChatFragment.tsx b/client/ui/chat/ChatFragment.tsx index 5dd693f..4f89ef4 100644 --- a/client/ui/chat/ChatFragment.tsx +++ b/client/ui/chat/ChatFragment.tsx @@ -80,13 +80,14 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC }) if (re.code != 200) return target != '' && checkApiSuccessOrSncakbar(re, "获取对话信息失败") - setChatInfo(re.data as Chat) + const chatInfo = re.data as Chat + setChatInfo(chatInfo) await loadMore() - setTabItemSelected("Chat") + setTabItemSelected(chatInfo.is_member ? "Chat" : "RequestJoin") if (re.data!.type == 'group') { - groupPreferenceStore.setState(re.data!.settings as GroupSettings) + groupPreferenceStore.setState(chatInfo.settings as GroupSettings) } setTimeout(() => { chatPanelRef.current!.scrollTo({