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.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index c93e261d..0aabed6f 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -556,7 +556,8 @@ export class OptionsUtil {
this._updateVersion20,
this._updateVersion21,
this._updateVersion22,
- this._updateVersion23
+ this._updateVersion23,
+ this._updateVersion24
];
if (typeof targetVersion === 'number' && targetVersion < result.length) {
result.splice(targetVersion);
@@ -1156,6 +1157,20 @@ export class OptionsUtil {
}
/**
+ * - Added dictionaries[].useDeinflections.
+ * @type {import('options-util').UpdateFunction}
+ */
+ async _updateVersion24(options) {
+ await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v24.handlebars');
+
+ for (const {options: profileOptions} of options.profiles) {
+ for (const dictionary of profileOptions.dictionaries) {
+ dictionary.useDeinflections = true;
+ }
+ }
+ }
+
+ /**
* @param {string} url
* @returns {Promise<chrome.tabs.Tab>}
*/