From 82c7c3772eea53e72e0d9909e4c7ebd69f5d0d84 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 9 Nov 2025 16:41:46 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E5=BD=93=E6=9C=AA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E4=BC=9A=E6=8F=90=E7=A4=BA=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8B=89=E5=8F=96=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/main/ContactsList.tsx | 7 ++++--- client/ui/main/RecentsList.tsx | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/ui/main/ContactsList.tsx b/client/ui/main/ContactsList.tsx index 730f63b..1eb153f 100644 --- a/client/ui/main/ContactsList.tsx +++ b/client/ui/main/ContactsList.tsx @@ -39,9 +39,10 @@ export default function ContactsList({ const re = await Client.invoke("User.getMyContacts", { token: data.access_token, }) - if (re.code != 200) - return checkApiSuccessOrSncakbar(re, "获取所有对话列表失败") - + if (re.code != 200) { + if (re.code != 401) checkApiSuccessOrSncakbar(re, "获取收藏对话列表失败") + return + } const ls = re.data!.contacts_list as Chat[] setContactsList(ls) setSharedFavouriteChats(ls) diff --git a/client/ui/main/RecentsList.tsx b/client/ui/main/RecentsList.tsx index 1b15510..7b3dbe0 100644 --- a/client/ui/main/RecentsList.tsx +++ b/client/ui/main/RecentsList.tsx @@ -35,9 +35,11 @@ export default function RecentsList({ const re = await Client.invoke("User.getMyRecentChats", { token: data.access_token, }) - if (re.code != 200) - return checkApiSuccessOrSncakbar(re, "获取最近对话列表失败") - + if (re.code != 200) { + if (re.code != 401) checkApiSuccessOrSncakbar(re, "获取最近对话列表失败") + return + } + setRecentsList(re.data!.recent_chats as RecentChat[]) } updateRecents()