diff --git a/ext/js/pages/settings/profile-controller.js b/ext/js/pages/settings/profile-controller.js index 11f5a9ea0..e32753df7 100644 --- a/ext/js/pages/settings/profile-controller.js +++ b/ext/js/pages/settings/profile-controller.js @@ -261,6 +261,10 @@ export class ProfileController { // Update profile index if (settingsProfileIndex === profileIndex) { this._settingsController.profileIndex = profileCurrentNew; + } else if (settingsProfileIndex > profileIndex) { + this._settingsController.profileIndex = settingsProfileIndex - 1; + } else { + this._settingsController.refreshProfileIndex(); } // Modify settings diff --git a/ext/js/pages/settings/settings-controller.js b/ext/js/pages/settings/settings-controller.js index ee44f875f..b53f05e35 100644 --- a/ext/js/pages/settings/settings-controller.js +++ b/ext/js/pages/settings/settings-controller.js @@ -67,6 +67,10 @@ export class SettingsController extends EventDispatcher { this._setProfileIndex(value, true); } + refreshProfileIndex() { + this._setProfileIndex(this._profileIndex, true); + } + /** @type {HtmlTemplateCollection} */ get templates() { return this._templates;