From 0148465e341f10514841a74df26d0ef4ddd859bb Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 24 Mar 2023 10:50:38 +0800 Subject: [PATCH] select last chat after delete --- src/app.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.tsx b/src/app.tsx index 7af532c..3f3e91b 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -164,7 +164,8 @@ export function App() { } // find nex selected chat index - const next = newAllChatStoreIndexes[0]; + const next = + newAllChatStoreIndexes[newAllChatStoreIndexes.length - 1]; console.log("next is", next); setSelectedChatIndex(next);