forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #595 from yorunning/fix
fix: hide toast when confirmation box is cancelled
This commit is contained in:
commit
9afed21efd
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user