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