From 7b9f18320c2f0d9dc37d65966f02cdde2c0c5b5e Mon Sep 17 00:00:00 2001 From: praschke Date: Mon, 23 Oct 2023 21:14:52 +0100 Subject: fix: save options after updating them _optionsUtil.save() is only called in _saveOptions, which is only called through - _onApiSetAllSettings - _onApiModifySettings - _onCommandToggleTextScanning it should be safe to simply save settings after updating them. without saving, the options will be updated every time the background restarts, until any settings are modified or text scanning is toggled. for _updateVersion21, this means the welcome page will open repeatedly to show the same warning. --- ext/js/data/options-util.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ext') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 1f2ffb05..1cf2a2c8 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -114,6 +114,7 @@ class OptionsUtil { if (typeof options !== 'undefined') { options = await this.update(options); + await save(options); } else { options = this.getDefault(); } -- cgit v1.2.3 From 5bf81019882901fa6359bb7337ce538991ec9075 Mon Sep 17 00:00:00 2001 From: praschke <91733887+praschke@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:55:09 +0000 Subject: fix: typo --- ext/js/data/options-util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 1cf2a2c8..e0cd0362 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -114,7 +114,7 @@ class OptionsUtil { if (typeof options !== 'undefined') { options = await this.update(options); - await save(options); + await this.save(options); } else { options = this.getDefault(); } -- cgit v1.2.3