Update "active character" field on char rename

1c0ca414b9ee073f47e8db230e6efe845b83a9f8

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +6 -0Showing whitespace changes
public/script.js+6 -0
@@ -6263,6 +6263,12 @@ export async function renameCharacter(name = null, { silent = false, renameChats
6263 saveSettingsDebounced();6263 saveSettingsDebounced();
6264 }6264 }
62656265
6266 // Update active character, if the current one was the currently active one
6267 if (active_character === oldAvatar) {
6268 active_character = newAvatar;
6269 saveSettingsDebounced();
6270 }
6271
6266 eventSource.emit(event_types.CHARACTER_RENAMED, oldAvatar, newAvatar);6272 eventSource.emit(event_types.CHARACTER_RENAMED, oldAvatar, newAvatar);
62676273
6268 // Reload characters list6274 // Reload characters list