fix: hide toast on cancel session deletion on mobile

This commit is contained in:
Yorun 2023-04-07 14:51:08 +08:00 committed by GitHub
parent a92b67cf5f
commit 822d7dd7e3

View File

@ -332,7 +332,7 @@ export const useChatStore = create<ChatStore>()(
const isLastSession = get().sessions.length === 1;
if (!isMobileScreen() || confirm(Locale.Home.DeleteChat)) {
get().removeSession(index);
}
showToast(Locale.Home.DeleteToast, {
text: Locale.Home.Revert,
onClick() {
@ -344,6 +344,7 @@ export const useChatStore = create<ChatStore>()(
}));
},
});
}
},
currentSession() {