feat: #499 revert delete session

This commit is contained in:
Yidadaa
2023-04-07 00:14:27 +08:00
parent 806587c8ea
commit 5952064362
11 changed files with 80 additions and 17 deletions

View File

@@ -59,6 +59,7 @@ export function ChatList() {
state.removeSession,
state.moveSession,
]);
const chatStore = useChatStore();
const onDragEnd: OnDragEndResponder = (result) => {
const { destination, source } = result;
@@ -95,10 +96,7 @@ export function ChatList() {
index={i}
selected={i === selectedIndex}
onClick={() => selectSession(i)}
onDelete={() =>
(!isMobileScreen() || confirm(Locale.Home.DeleteChat)) &&
removeSession(i)
}
onDelete={chatStore.deleteSession}
/>
))}
{provided.placeholder}