Rerender the list if migrated persona
| @@ -985,7 +985,7 @@ async function firstLoadInit() { | ||
| 985 | 985 | await initTokenizers(); |
| 986 | 986 | initBackgrounds(); |
| 987 | 987 | initAuthorsNote(); |
| 988 | 988 | await initPersonas(); |
| 989 | 989 | initRossMods(); |
| 990 | 990 | initStats(); |
| 991 | 991 | initCfg(); |
| @@ -1581,7 +1581,7 @@ async function duplicatePersona(avatarId) { | ||
| 1581 | 1581 | /** |
| 1582 | 1582 | * If a current user avatar is not bound to persona, bind it. |
| 1583 | 1583 | */ |
| 1584 | 1584 | async function migrateNonPersonaUser() { |
| 1585 | 1585 | if (user_avatar in power_user.personas) { |
| 1586 | 1586 | return; |
| 1587 | 1587 | } |
| @@ -1589,12 +1589,12 @@ function migrateNonPersonaUser() { | ||
| 1589 | 1589 | power_user.personas[user_avatar] = name1; |
| 1590 | 1590 | void getOrCreatePersonaDescriptor(); |
| 1591 | 1591 | setPersonaDescription(); |
| 1592 | + await getUserAvatars(true, user_avatar); | |
| 1592 | 1593 | saveSettingsDebounced(); |
| 1593 | 1594 | } |
| 1594 | 1595 | |
| 1595 | - | |
| 1596 | +export async function initPersonas() { | |
| 1596 | -export function initPersonas() { | |
| 1597 | + await migrateNonPersonaUser(); | |
| 1597 | - migrateNonPersonaUser(); | |
| 1598 | 1598 | $('#persona_delete_button').on('click', deleteUserAvatar); |
| 1599 | 1599 | $('#lock_persona_default').on('click', () => togglePersonaLock('default')); |
| 1600 | 1600 | $('#lock_user_name').on('click', () => togglePersonaLock('chat')); |