Fix auto-load chat when opening from welcome screen

eeb37a6f9493f50399e43bcd11c912fb556b6bbe

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +7 -0Ignore whitespace
public/scripts/welcome-screen.js+7 -0
@@ -18,7 +18,10 @@ import {
1818 openCharacterChat,
1919 printCharactersDebounced,
2020 renameGroupOrCharacterChat,
21+ saveSettingsDebounced,
2122 selectCharacterById,
23+ setActiveCharacter,
24+ setActiveGroup,
2225 system_avatar,
2326 system_message_types,
2427 this_chid,
@@ -296,6 +299,8 @@ async function openRecentCharacterChat(avatarId, fileName) {
296299
297300 try {
298301 await selectCharacterById(characterId);
302+ setActiveCharacter(avatarId);
303+ saveSettingsDebounced();
299304 const currentChatId = getCurrentChatId();
300305 if (currentChatId === fileName) {
301306 console.debug(`Chat ${fileName} is already open.`);
@@ -322,6 +327,8 @@ async function openRecentGroupChat(groupId, fileName) {
322327
323328 try {
324329 await openGroupById(groupId);
330+ setActiveGroup(groupId);
331+ saveSettingsDebounced();
325332 const currentChatId = getCurrentChatId();
326333 if (currentChatId === fileName) {
327334 console.debug(`Chat ${fileName} is already open.`);