Skip to content
Snippets Groups Projects
Unverified Commit e9b7ec73 authored by GyDi's avatar GyDi
Browse files

fix: profile updated field

parent 74378813
No related branches found
No related tags found
No related merge requests found
......@@ -380,8 +380,7 @@ impl Profiles {
patch!(each, item, url);
patch!(each, item, selected);
patch!(each, item, extra);
each.updated = Some(help::get_now());
patch!(each, item, updated);
self.items = Some(items);
return self.save_file();
......
......@@ -75,7 +75,7 @@ const ProxyGroup = ({ group }: Props) => {
} else {
profile.selected[index] = { name: group.name, now: name };
}
await patchProfile(profiles!.current!, profile);
await patchProfile(profiles!.current!, { selected: profile.selected });
} catch (err) {
console.error(err);
}
......
......@@ -81,7 +81,10 @@ const ProfilePage = () => {
name,
now,
}));
patchProfile(current!, profile).catch(console.error);
patchProfile(current!, { selected: profile.selected }).catch(
console.error
);
// update proxies cache
if (hasChange) mutate("getProxies", getProxies());
}, 100);
......
......@@ -35,7 +35,7 @@ export async function deleteProfile(index: string) {
export async function patchProfile(
index: string,
profile: CmdType.ProfileItem
profile: Partial<CmdType.ProfileItem>
) {
return invoke<void>("patch_profile", { index, profile });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment