Do not delete selected characters on cancel

This commit is contained in:
artisticMink 2023-11-06 15:56:47 +01:00
parent 581a1e485b
commit a0f828a2da
1 changed files with 6 additions and 2 deletions

View File

@ -528,10 +528,14 @@ class BulkEditOverlay {
handleContextMenuDelete = () => {
callPopup(
popupMessage.deleteChat(this.selectedCharacters.length), null)
.then(deleteChats =>
.then((accept) => {
if (true !== accept) return;
const deleteChats = document.getElementById('del_char_checkbox').checked ?? false;
Promise.all(this.selectedCharacters.map(async characterId => CharacterContextMenu.delete(characterId, deleteChats)))
.then(() => getCharacters())
.then(() => this.browseState())
.then(() => this.browseState())}
);
}