Skip to content

Commit

Permalink
Fix setting page theme not updating when reset button is pressed (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube authored Jul 12, 2024
1 parent 7ce731c commit 825991b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/js/pages/settings/backup-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

import {Dexie} from '../../../lib/dexie.js';
import {ThemeController} from '../../app/theme-controller.js';
import {parseJson} from '../../core/json.js';
import {log} from '../../core/log.js';
import {isObjectNotArray} from '../../core/object-utilities.js';
Expand Down Expand Up @@ -62,6 +63,9 @@ export class BackupController {
} catch (e) {
// NOP
}

/** @type {ThemeController} */
this._themeController = new ThemeController(document.documentElement);
}

/** */
Expand Down Expand Up @@ -524,6 +528,12 @@ export class BackupController {
// Update dictionaries
await DictionaryController.ensureDictionarySettings(this._settingsController, void 0, optionsFull, false, false);

// Update display theme
this._themeController.theme = optionsFull.profiles[optionsFull.profileCurrent].options.general.popupTheme;
this._themeController.prepare();
this._themeController.siteOverride = true;
this._themeController.updateTheme();

// Assign options
try {
await this._settingsImportSetOptionsFull(optionsFull);
Expand Down

0 comments on commit 825991b

Please sign in to comment.