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,
|
"mouse": true,
|
||||||
"touch": false,
|
"touch": false,
|
||||||
"pen": false
|
"pen": false
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"showAdvanced": false,
|
||||||
|
"scanOnPenHover": true,
|
||||||
|
"scanOnPenPress": true,
|
||||||
|
"scanOnPenRelease": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -356,6 +362,12 @@
|
|||||||
"mouse": false,
|
"mouse": false,
|
||||||
"touch": true,
|
"touch": true,
|
||||||
"pen": true
|
"pen": true
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"showAdvanced": false,
|
||||||
|
"scanOnPenHover": true,
|
||||||
|
"scanOnPenPress": true,
|
||||||
|
"scanOnPenRelease": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -529,7 +529,7 @@ class OptionsUtil {
|
|||||||
profileOptions.scanning.hideDelay = 0;
|
profileOptions.scanning.hideDelay = 0;
|
||||||
profileOptions.scanning.pointerEventsEnabled = false;
|
profileOptions.scanning.pointerEventsEnabled = false;
|
||||||
|
|
||||||
const {modifier, middleMouse, touchInputEnabled} = profileOptions.scanning;
|
const {modifier, middleMouse} = profileOptions.scanning;
|
||||||
const scanningInputs = [];
|
const scanningInputs = [];
|
||||||
let modifierInput = '';
|
let modifierInput = '';
|
||||||
switch (modifier) {
|
switch (modifier) {
|
||||||
@ -557,14 +557,12 @@ class OptionsUtil {
|
|||||||
options: createInputDefaultOptions()
|
options: createInputDefaultOptions()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (touchInputEnabled) {
|
scanningInputs.push({
|
||||||
scanningInputs.push({
|
include: '',
|
||||||
include: '',
|
exclude: '',
|
||||||
exclude: '',
|
types: {mouse: false, touch: true, pen: true},
|
||||||
types: {mouse: false, touch: true, pen: true},
|
options: createInputDefaultOptions()
|
||||||
options: createInputDefaultOptions()
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
profileOptions.scanning.inputs = scanningInputs;
|
profileOptions.scanning.inputs = scanningInputs;
|
||||||
}
|
}
|
||||||
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars');
|
await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars');
|
||||||
|
Loading…
Reference in New Issue
Block a user