Settings upgrade and schema fixes (#823)
* Add missing defaults * Always include touch input during upgrade
This commit is contained in:
parent
a12c4a1dd7
commit
b180ebc3bc
@ -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
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -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()
|
||||
});
|
||||
}
|
||||
profileOptions.scanning.inputs = scanningInputs;
|
||||
}
|
||||
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars');
|
||||
|
Loading…
Reference in New Issue
Block a user