mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-13 18:40:11 +01:00
Update "active character" field on char rename
This commit is contained in:
parent
4f0921856f
commit
1c0ca414b9
@ -6263,6 +6263,12 @@ export async function renameCharacter(name = null, { silent = false, renameChats
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
// Update active character, if the current one was the currently active one
|
||||
if (active_character === oldAvatar) {
|
||||
active_character = newAvatar;
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
eventSource.emit(event_types.CHARACTER_RENAMED, oldAvatar, newAvatar);
|
||||
|
||||
// Reload characters list
|
||||
|
Loading…
x
Reference in New Issue
Block a user