Skip to content

Commit

Permalink
edited options-util.js to include settings for average frequency, bum…
Browse files Browse the repository at this point in the history
…ped version
  • Loading branch information
tadorituki committed Feb 25, 2025
1 parent 7ba6c13 commit c6d6ee5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions ext/js/data/options-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ export class OptionsUtil {
this._updateVersion59,
this._updateVersion60,
this._updateVersion61,
this._updateVersion62,
];
/* eslint-enable @typescript-eslint/unbound-method */
if (typeof targetVersion === 'number' && targetVersion < result.length) {
Expand Down Expand Up @@ -1615,6 +1616,16 @@ export class OptionsUtil {
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v61.handlebars');
}

/**
* - Added options.general.averageFrequency
* @type {import('options-util').UpdateFunction}
*/
async _updateVersion62(options) {
for (const profile of options.profiles) {
profile.options.general.averageFrequency = false;
}
}

/**
* @param {string} url
* @returns {Promise<chrome.tabs.Tab>}
Expand Down
2 changes: 1 addition & 1 deletion test/options-util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ function createOptionsUpdatedTestData1() {
},
],
profileCurrent: 0,
version: 61,
version: 62,
global: {
database: {
prefixWildcardsSupported: false,
Expand Down

0 comments on commit c6d6ee5

Please sign in to comment.