handle deleting

This commit is contained in:
LenAnderson
2023-12-20 17:56:08 +00:00
parent 41a88e165c
commit ac09fa6019
5 changed files with 96 additions and 82 deletions

View File

@ -26,17 +26,16 @@ export class QuickReplySet {
/**@type {String}*/ name;
/**@type {Boolean}*/ disableSend = false;
/**@type {Boolean}*/ placeBeforeInput = false;
/**@type {Boolean}*/ injectInput = false;
/**@type {QuickReply[]}*/ qrList = [];
/**@type {Number}*/ idIndex = 0;
/**@type {Function}*/ save;
/**@type {Boolean}*/ isDeleted = false;
/**@type {Function}*/ save;
/**@type {HTMLElement}*/ dom;
/**@type {HTMLElement}*/ settingsDom;
@ -201,6 +200,7 @@ export class QuickReplySet {
this.unrender();
const idx = QuickReplySet.list.indexOf(this);
QuickReplySet.list.splice(idx, 1);
this.isDeleted = true;
} else {
warn(`Failed to delete Quick Reply Set: ${this.name}`);
}