mobile: only autoclose char panel if it's actually open

This commit is contained in:
RossAscends
2025-09-18 03:42:20 +09:00
parent 1e7309fa17
commit 97e4b41bc2
+6 -1
View File
@@ -813,7 +813,12 @@ export async function selectCharacterById(id, { switchMenu = true } = {}) {
select_selected_character(this_chid, { switchMenu });
}
if (isMobile()) {
//close open char panel if it was already open
//avoids opening the char panel via Welcome Screen recent chats
//or other means of calling this function (such as QRs with /go).
//there should be no cases on mobile where char panel is open and
//you're able to get here other than an avatar click.
if (isMobile() && $('#rightNavDrawerIcon').hasClass('openIcon')) {
$('#rightNavDrawerIcon').trigger('click');
}
}