mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Rerender the list if migrated persona
This commit is contained in:
@@ -985,7 +985,7 @@ async function firstLoadInit() {
|
||||
await initTokenizers();
|
||||
initBackgrounds();
|
||||
initAuthorsNote();
|
||||
initPersonas();
|
||||
await initPersonas();
|
||||
initRossMods();
|
||||
initStats();
|
||||
initCfg();
|
||||
|
@@ -1581,7 +1581,7 @@ async function duplicatePersona(avatarId) {
|
||||
/**
|
||||
* If a current user avatar is not bound to persona, bind it.
|
||||
*/
|
||||
function migrateNonPersonaUser() {
|
||||
async function migrateNonPersonaUser() {
|
||||
if (user_avatar in power_user.personas) {
|
||||
return;
|
||||
}
|
||||
@@ -1589,12 +1589,12 @@ function migrateNonPersonaUser() {
|
||||
power_user.personas[user_avatar] = name1;
|
||||
void getOrCreatePersonaDescriptor();
|
||||
setPersonaDescription();
|
||||
await getUserAvatars(true, user_avatar);
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
|
||||
export function initPersonas() {
|
||||
migrateNonPersonaUser();
|
||||
export async function initPersonas() {
|
||||
await migrateNonPersonaUser();
|
||||
$('#persona_delete_button').on('click', deleteUserAvatar);
|
||||
$('#lock_persona_default').on('click', () => togglePersonaLock('default'));
|
||||
$('#lock_user_name').on('click', () => togglePersonaLock('chat'));
|
||||
|
Reference in New Issue
Block a user