Fix tag display issues (char create, auto load)

- Fix tags not working on new character dialog
- Fix display of tags for auto-loaded character on enabled auto load
This commit is contained in:
Wolfsblvt
2024-03-27 04:28:24 +01:00
parent 40daf1ca1d
commit 4547e68497
2 changed files with 24 additions and 23 deletions

View File

@ -27,7 +27,7 @@ import {
import { LoadLocal, SaveLocal, LoadLocalBool } from './f-localStorage.js';
import { selected_group, is_group_generating, openGroupById } from './group-chats.js';
import { getTagKeyForEntity } from './tags.js';
import { getTagKeyForEntity, applyTagsOnCharacterSelect } from './tags.js';
import {
SECRET_KEYS,
secret_state,
@ -252,6 +252,10 @@ async function RA_autoloadchat() {
const active_character_id = characters.findIndex(x => getTagKeyForEntity(x) === active_character);
if (active_character_id !== null) {
await selectCharacterById(String(active_character_id));
// Do a little tomfoolery to spoof the tag selector
const selectedCharElement = $(`#rm_print_characters_block .character_select[chid="${active_character_id}"]`)
applyTagsOnCharacterSelect.call(selectedCharElement);
}
}