aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-13 13:16:56 -0400
committerGitHub <noreply@github.com>2020-09-13 13:16:56 -0400
commitb180ebc3bc5182712fe33e5af3bea64b06204dcc (patch)
tree197faaf27ed093d552e2a73effde818fcf55d9ed
parenta12c4a1dd790475cfeb73e81988d67325ed9973e (diff)
Settings upgrade and schema fixes (#823)
* Add missing defaults * Always include touch input during upgrade
-rw-r--r--ext/bg/data/options-schema.json12
-rw-r--r--ext/bg/js/options.js16
2 files changed, 19 insertions, 9 deletions
diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json
index 240305b5..0f310f6e 100644
--- a/ext/bg/data/options-schema.json
+++ b/ext/bg/data/options-schema.json
@@ -347,6 +347,12 @@
"mouse": true,
"touch": false,
"pen": false
+ },
+ "options": {
+ "showAdvanced": false,
+ "scanOnPenHover": true,
+ "scanOnPenPress": true,
+ "scanOnPenRelease": false
}
},
{
@@ -356,6 +362,12 @@
"mouse": false,
"touch": true,
"pen": true
+ },
+ "options": {
+ "showAdvanced": false,
+ "scanOnPenHover": true,
+ "scanOnPenPress": true,
+ "scanOnPenRelease": false
}
}
],
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 89538b3e..673666bb 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -529,7 +529,7 @@ class OptionsUtil {
profileOptions.scanning.hideDelay = 0;
profileOptions.scanning.pointerEventsEnabled = false;
- const {modifier, middleMouse, touchInputEnabled} = profileOptions.scanning;
+ const {modifier, middleMouse} = profileOptions.scanning;
const scanningInputs = [];
let modifierInput = '';
switch (modifier) {
@@ -557,14 +557,12 @@ class OptionsUtil {
options: createInputDefaultOptions()
});
}
- if (touchInputEnabled) {
- scanningInputs.push({
- include: '',
- exclude: '',
- types: {mouse: false, touch: true, pen: true},
- options: createInputDefaultOptions()
- });
- }
+ scanningInputs.push({
+ include: '',
+ exclude: '',
+ types: {mouse: false, touch: true, pen: true},
+ options: createInputDefaultOptions()
+ });
profileOptions.scanning.inputs = scanningInputs;
}
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars');