Fix auto-load chat when opening from welcome screen
| @@ -18,7 +18,10 @@ import { | ||
| 18 | 18 | openCharacterChat, |
| 19 | 19 | printCharactersDebounced, |
| 20 | 20 | renameGroupOrCharacterChat, |
| 21 | + saveSettingsDebounced, | |
| 21 | 22 | selectCharacterById, |
| 23 | + setActiveCharacter, | |
| 24 | + setActiveGroup, | |
| 22 | 25 | system_avatar, |
| 23 | 26 | system_message_types, |
| 24 | 27 | this_chid, |
| @@ -296,6 +299,8 @@ async function openRecentCharacterChat(avatarId, fileName) { | ||
| 296 | 299 | |
| 297 | 300 | try { |
| 298 | 301 | await selectCharacterById(characterId); |
| 302 | + setActiveCharacter(avatarId); | |
| 303 | + saveSettingsDebounced(); | |
| 299 | 304 | const currentChatId = getCurrentChatId(); |
| 300 | 305 | if (currentChatId === fileName) { |
| 301 | 306 | console.debug(`Chat ${fileName} is already open.`); |
| @@ -322,6 +327,8 @@ async function openRecentGroupChat(groupId, fileName) { | ||
| 322 | 327 | |
| 323 | 328 | try { |
| 324 | 329 | await openGroupById(groupId); |
| 330 | + setActiveGroup(groupId); | |
| 331 | + saveSettingsDebounced(); | |
| 325 | 332 | const currentChatId = getCurrentChatId(); |
| 326 | 333 | if (currentChatId === fileName) { |
| 327 | 334 | console.debug(`Chat ${fileName} is already open.`); |