Isolate to background window
This commit is contained in:
parent
8b7e293eae
commit
9fb89d8f7d
@ -165,7 +165,7 @@ async function onTargetProfileChanged() {
|
|||||||
|
|
||||||
async function onProfileAdd() {
|
async function onProfileAdd() {
|
||||||
const optionsFull = await apiOptionsGetFull();
|
const optionsFull = await apiOptionsGetFull();
|
||||||
const profile = utilIsolate(optionsFull.profiles[currentProfileIndex]);
|
const profile = utilBackgroundIsolate(optionsFull.profiles[currentProfileIndex]);
|
||||||
profile.name = profileOptionsCreateCopyName(profile.name, optionsFull.profiles, 100);
|
profile.name = profileOptionsCreateCopyName(profile.name, optionsFull.profiles, 100);
|
||||||
optionsFull.profiles.push(profile);
|
optionsFull.profiles.push(profile);
|
||||||
currentProfileIndex = optionsFull.profiles.length - 1;
|
currentProfileIndex = optionsFull.profiles.length - 1;
|
||||||
@ -255,8 +255,8 @@ async function onProfileCopyConfirm() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const profile = utilIsolate(optionsFull.profiles[index].options);
|
const profileOptions = utilBackgroundIsolate(optionsFull.profiles[index].options);
|
||||||
optionsFull.profiles[currentProfileIndex].options = profile;
|
optionsFull.profiles[currentProfileIndex].options = profileOptions;
|
||||||
|
|
||||||
await profileOptionsUpdateTarget(optionsFull);
|
await profileOptionsUpdateTarget(optionsFull);
|
||||||
await settingsSaveOptions();
|
await settingsSaveOptions();
|
||||||
|
Loading…
Reference in New Issue
Block a user