aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
authorEloy Robillard <eloy.robillard@gmail.com>2024-02-15 04:02:36 +0100
committerGitHub <noreply@github.com>2024-02-15 03:02:36 +0000
commit7a4096240ce4faf70a785d047945388baa0daab3 (patch)
tree841da38533391a095fdb932c528c4b5c3366ba1b /ext/js/data
parent043ac79203abbc9c7f3aa971e2de8ddedb3c0e90 (diff)
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*/
Diffstat (limited to 'ext/js/data')
-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 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) {
@@ -1140,6 +1141,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<chrome.tabs.Tab>}
*/