Only refresh character list after all deletions have been processed.

This commit is contained in:
artisticMink
2023-12-09 13:21:46 +01:00
parent 6f610204d6
commit ba3966e148
2 changed files with 5 additions and 4 deletions

View File

@ -123,9 +123,9 @@ class CharacterContextMenu {
cache: 'no-cache',
}).then(response => {
if (response.ok) {
deleteCharacter(character.name, character.avatar).then(() => {
return deleteCharacter(character.name, character.avatar, false).then(() => {
if (deleteChats) {
fetch('/api/characters/chats', {
return fetch('/api/characters/chats', {
method: 'POST',
body: JSON.stringify({ avatar_url: character.avatar }),
headers: getRequestHeaders(),