From af1cff6230900e182e636163332b7035bd661f13 Mon Sep 17 00:00:00 2001 From: lolocoo Date: Fri, 2 Aug 2024 10:14:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(appList):=20=E5=88=A0=E9=99=A4=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=90=8E=E5=9B=9E=E5=88=B0=E8=81=8A=E5=A4=A9=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=9C=80=E5=90=8E=E4=B8=80=E6=AC=A1=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E7=9A=84=E5=BA=94=E7=94=A8=E6=97=B6=E6=8F=90=E7=A4=BA=E6=97=A0?= =?UTF-8?q?=E8=AF=A5=E5=BA=94=E7=94=A8bug=20(#2236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/app/src/pages/app/list/components/List.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/app/src/pages/app/list/components/List.tsx b/projects/app/src/pages/app/list/components/List.tsx index 87d03b285..803f578ee 100644 --- a/projects/app/src/pages/app/list/components/List.tsx +++ b/projects/app/src/pages/app/list/components/List.tsx @@ -39,6 +39,7 @@ import { getTeamMembers } from '@/web/support/user/team/api'; import { formatTimeToChatTime } from '@fastgpt/global/common/string/time'; import { useSystem } from '@fastgpt/web/hooks/useSystem'; import { useSystemStore } from '@/web/common/system/useSystemStore'; +import { useChatStore } from '@/web/core/chat/context/storeChat'; const HttpEditModal = dynamic(() => import('./HttpPluginEditModal')); const ListItem = () => { @@ -47,6 +48,8 @@ const ListItem = () => { const router = useRouter(); const { parentId = null } = router.query; const { isPc } = useSystem(); + const { lastChatAppId, setLastChatAppId } = useChatStore(); + const { myApps, loadMyApps, onUpdateApp, setMoveAppId, folderDetail } = useContextSelector( AppListContext, @@ -83,6 +86,9 @@ const ListItem = () => { }); const { runAsync: onclickDelApp } = useRequest2( (id: string) => { + if (id === lastChatAppId) { + setLastChatAppId(''); + } return delAppById(id); }, {