diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index c3bfa759c..52dec643d 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -346,11 +346,9 @@ async function RA_autoloadchat() { if (document.getElementById('CharID0') !== null) { // active character is the name, we should look it up in the character list and get the id let active_character_id = Object.keys(characters).find(key => characters[key].avatar === active_character); - // active group is the name, we should look it up in the group list and get the id - let active_group_id = groups.find(x => x.name === active_group)?.id; var charToAutoLoad = document.getElementById('CharID' + active_character_id); - let groupToAutoLoad = document.querySelector(`.group_select[grid="${active_group_id}"]`); + let groupToAutoLoad = document.querySelector(`.group_select[grid="${active_group}"]`); if (charToAutoLoad != null) { $(charToAutoLoad).click(); } @@ -924,11 +922,13 @@ $("document").ready(function () { $(document).on("click", ".character_select", function () { setActiveCharacter($(this).find('.avatar').attr('title')); setActiveGroup(null); + saveSettingsDebounced(); }); $(document).on("click", ".group_select", function () { setActiveCharacter(null); setActiveGroup($(this).data('id')); + saveSettingsDebounced(); });