aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/settings/scan-inputs-controller.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/ext/bg/js/settings/scan-inputs-controller.js b/ext/bg/js/settings/scan-inputs-controller.js
index fbafe570..3ee4cb34 100644
--- a/ext/bg/js/settings/scan-inputs-controller.js
+++ b/ext/bg/js/settings/scan-inputs-controller.js
@@ -64,9 +64,12 @@ class ScanInputsController {
return true;
}
- setProperty(index, property, value) {
+ async setProperty(index, property, value, event) {
const path = `scanning.inputs[${index}].${property}`;
- return this._settingsController.setProfileSetting(path, value);
+ await this._settingsController.setProfileSetting(path, value);
+ if (event) {
+ this._triggerScanInputsChanged();
+ }
}
instantiateTemplate(name) {
@@ -131,6 +134,10 @@ class ScanInputsController {
async _modifyProfileSettings(targets) {
await this._settingsController.modifyProfileSettings(targets);
+ this._triggerScanInputsChanged();
+ }
+
+ _triggerScanInputsChanged() {
this._settingsController.trigger('scanInputsChanged', {source: this});
}
@@ -224,11 +231,11 @@ class ScanInputField {
// Private
_onIncludeValueChange({value}) {
- this._parent.setProperty(this._index, 'include', value);
+ this._parent.setProperty(this._index, 'include', value, true);
}
_onExcludeValueChange({value}) {
- this._parent.setProperty(this._index, 'exclude', value);
+ this._parent.setProperty(this._index, 'exclude', value, true);
}
_onRemoveClick(e) {
@@ -287,6 +294,6 @@ class ScanInputField {
_setAdvancedOptionsVisible(showAdvanced) {
showAdvanced = !!showAdvanced;
this._node.dataset.showAdvanced = `${showAdvanced}`;
- this._parent.setProperty(this._index, 'options.showAdvanced', showAdvanced);
+ this._parent.setProperty(this._index, 'options.showAdvanced', showAdvanced, false);
}
}