aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index af81f29e..4e468aea 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -535,7 +535,8 @@ export class OptionsUtil {
this._updateVersion26,
this._updateVersion27,
this._updateVersion28,
- this._updateVersion29
+ this._updateVersion29,
+ this._updateVersion30
];
/* eslint-enable @typescript-eslint/unbound-method */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
@@ -605,7 +606,7 @@ export class OptionsUtil {
showAdvanced: false,
searchTerms: true,
searchKanji: true,
- scanOnTouchMove: true,
+ scanOnTouchMove: false,
scanOnPenHover: true,
scanOnPenPress: true,
scanOnPenRelease: false,
@@ -1217,6 +1218,20 @@ export class OptionsUtil {
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v29.handlebars');
}
+ /**
+ * - Added scanning.inputs[].options.scanOnTouchTap.
+ * - Set touch settings to be more sensible.
+ * @type {import('options-util').UpdateFunction}
+ */
+ async _updateVersion30(options) {
+ for (const profile of options.profiles) {
+ for (const input of profile.options.scanning.inputs) {
+ input.options.scanOnTouchTap = true;
+ input.options.scanOnTouchPress = false;
+ input.options.scanOnTouchRelease = false;
+ }
+ }
+ }
/**
* @param {string} url