aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/backup-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-10 23:12:01 -0500
committerGitHub <noreply@github.com>2024-02-11 04:12:01 +0000
commit765f1ede668f70e3af7717bf4d5f05dbf009c7f8 (patch)
treee73f481c93f8bbaa42f7c8216190fb1cb4621301 /ext/js/pages/settings/backup-controller.js
parent805cf9cb3ea744a6d7c0a5da27fc9ef4e6f08626 (diff)
Eslint rule updates (#665)
* Padding newline rules * Update rules * Update rules * Update rules * Updates * Update object quotes * Merge similar ts and js rules * Change export spacing rules * Move typescript-eslint rules * Spacing * Actually save and commit changes
Diffstat (limited to 'ext/js/pages/settings/backup-controller.js')
-rw-r--r--ext/js/pages/settings/backup-controller.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index 79733c4d..59bcaed9 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -579,7 +579,9 @@ export class BackupController {
*/
async _exportDatabase(databaseName) {
const db = await new Dexie(databaseName).open();
- const blob = await db.export({progressCallback: this._databaseExportProgressCallback});
+ const blob = await db.export({
+ progressCallback: this._databaseExportProgressCallback.bind(this)
+ });
await db.close();
return blob;
}
@@ -639,12 +641,14 @@ export class BackupController {
}
/**
- * @param {string} databaseName
+ * @param {string} _databaseName
* @param {File} file
*/
- async _importDatabase(databaseName, file) {
+ async _importDatabase(_databaseName, file) {
await this._settingsController.application.api.purgeDatabase();
- await Dexie.import(file, {progressCallback: this._databaseImportProgressCallback});
+ await Dexie.import(file, {
+ progressCallback: this._databaseImportProgressCallback.bind(this)
+ });
this._settingsController.application.api.triggerDatabaseUpdated('dictionary', 'import');
this._settingsController.application.triggerStorageChanged();
}