Make overlay work with legacy bulk delete button
This commit is contained in:
parent
2d42882a4b
commit
d2bc1e12c3
|
@ -5526,6 +5526,8 @@ export async function getChatsFromFiles(data, isGroupChat) {
|
|||
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
||||
*/
|
||||
async function getPastCharacterChats() {
|
||||
if (!characters.includes(this_chid)) return;
|
||||
|
||||
const response = await fetch("/getallchatsofcharacter", {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ avatar_url: characters[this_chid].avatar }),
|
||||
|
|
|
@ -209,6 +209,7 @@ class BulkEditOverlay {
|
|||
static characterClass = 'character_select';
|
||||
static selectModeClass = 'group_overlay_mode_select';
|
||||
static selectedClass = 'character_selected';
|
||||
static legacySelectedClass = 'bulk_select_checkbox';
|
||||
|
||||
#state = CharacterGroupOverlayState.browse;
|
||||
#longPress = false;
|
||||
|
@ -364,9 +365,11 @@ class BulkEditOverlay {
|
|||
|
||||
if (alreadySelected) {
|
||||
character.classList.remove(BulkEditOverlay.selectedClass);
|
||||
character.querySelector('.' + BulkEditOverlay.legacySelectedClass).checked = false;
|
||||
this.dismissCharacter(characterId);
|
||||
} else {
|
||||
character.classList.add(BulkEditOverlay.selectedClass);
|
||||
character.classList.add(BulkEditOverlay.selectedClass)
|
||||
character.querySelector('.' + BulkEditOverlay.legacySelectedClass).checked = true;
|
||||
this.selectCharacter(characterId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue