select last chat after delete

This commit is contained in:
2023-03-24 10:50:38 +08:00
parent 9b00cd0fbc
commit 0148465e34

View File

@@ -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);