summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/backup.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-08-01 11:46:35 -0400
committerGitHub <noreply@github.com>2020-08-01 11:46:35 -0400
commitb52074b3f0df09b9e37a210789507aa553a2dc9d (patch)
treec877b6f3c757468e34e1ac71f9626eb54bd1c0a5 /ext/bg/js/settings/backup.js
parentf1e7288c11db2ef615696f90d12f2e028a215998 (diff)
Options util (#700)
* Move options functions into a class * Rename and privatize * Organize by public/private * Refactor to use async function * Simplify update function signature * Add comment for update * Rename * Copy _applyUpdates into _legacyProfileUpdateUpdateVersion * Organize * Move profile options updates * Refactor update details * Add async support * Formatting
Diffstat (limited to 'ext/bg/js/settings/backup.js')
-rw-r--r--ext/bg/js/settings/backup.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/bg/js/settings/backup.js b/ext/bg/js/settings/backup.js
index 13f90886..57963cec 100644
--- a/ext/bg/js/settings/backup.js
+++ b/ext/bg/js/settings/backup.js
@@ -16,9 +16,8 @@
*/
/* global
+ * OptionsUtil
* api
- * optionsGetDefault
- * optionsUpdateVersion
*/
class SettingsBackup {
@@ -323,7 +322,7 @@ class SettingsBackup {
}
// Upgrade options
- optionsFull = optionsUpdateVersion(optionsFull, {});
+ optionsFull = await OptionsUtil.update(optionsFull);
// Check for warnings
const sanitizationWarnings = this._settingsImportSanitizeOptions(optionsFull, true);
@@ -369,7 +368,7 @@ class SettingsBackup {
$('#settings-reset-modal').modal('hide');
// Get default options
- const optionsFull = optionsGetDefault();
+ const optionsFull = await OptionsUtil.getDefault();
// Assign options
await this._settingsImportSetOptionsFull(optionsFull);