summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/profiles.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/profiles.js')
-rw-r--r--ext/bg/js/settings/profiles.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/bg/js/settings/profiles.js b/ext/bg/js/settings/profiles.js
index 867b17aa..3f4b1da7 100644
--- a/ext/bg/js/settings/profiles.js
+++ b/ext/bg/js/settings/profiles.js
@@ -190,6 +190,8 @@ async function onTargetProfileChanged() {
currentProfileIndex = index;
await profileOptionsUpdateTarget(optionsFull);
+
+ yomichan.trigger('modifyingProfileChange');
}
async function onProfileAdd() {
@@ -197,9 +199,13 @@ async function onProfileAdd() {
const profile = utilBackgroundIsolate(optionsFull.profiles[currentProfileIndex]);
profile.name = profileOptionsCreateCopyName(profile.name, optionsFull.profiles, 100);
optionsFull.profiles.push(profile);
+
currentProfileIndex = optionsFull.profiles.length - 1;
+
await profileOptionsUpdateTarget(optionsFull);
await settingsSaveOptions();
+
+ yomichan.trigger('modifyingProfileChange');
}
async function onProfileRemove(e) {
@@ -238,6 +244,8 @@ async function onProfileRemoveConfirm() {
await profileOptionsUpdateTarget(optionsFull);
await settingsSaveOptions();
+
+ yomichan.trigger('modifyingProfileChange');
}
function onProfileNameChanged() {
@@ -263,6 +271,8 @@ async function onProfileMove(offset) {
await profileOptionsUpdateTarget(optionsFull);
await settingsSaveOptions();
+
+ yomichan.trigger('modifyingProfileChange');
}
async function onProfileCopy() {