From 7a4096240ce4faf70a785d047945388baa0daab3 Mon Sep 17 00:00:00 2001 From: Eloy Robillard Date: Thu, 15 Feb 2024 04:02:36 +0100 Subject: Show all duplicate notes on click (#636) * Show all duplicate notes on click * Change 'notesView' to 'viewNotes' * Replace api.noteView with api.viewNotes * Update "viewNote" action to "viewNotes" in options util * Update options-util test with "viewNotes" action * Replace uses of "viewNote" with "viewNotes" * Replace _viewNote with _viewNotes * Rename /*ViewNote*/ methods to /*ViewNotes*/ --- ext/js/data/options-util.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'ext/js/data') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 312c6efc..1644df2f 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -521,7 +521,8 @@ export class OptionsUtil { this._updateVersion21, this._updateVersion22, this._updateVersion23, - this._updateVersion24 + this._updateVersion24, + this._updateVersion25 ]; /* eslint-enable @typescript-eslint/unbound-method */ if (typeof targetVersion === 'number' && targetVersion < result.length) { @@ -1139,6 +1140,20 @@ export class OptionsUtil { } } + /** + * - Change 'viewNote' action to 'viewNotes'. + * @type {import('options-util').UpdateFunction} + */ + async _updateVersion25(options) { + for (const profile of options.profiles) { + for (const hotkey of profile.options.inputs.hotkeys) { + if (hotkey.action === 'viewNote') { + hotkey.action = 'viewNotes'; + } + } + } + } + /** * @param {string} url * @returns {Promise} -- cgit v1.2.3