mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-17 07:50:33 +08:00
perf(tun-viewer): run enhanceProfiles in background to avoid save blocking
This commit is contained in:
parent
1889f18183
commit
13855b9bc2
@ -89,13 +89,11 @@ export function TunViewer({ ref }: { ref?: Ref<DialogRef> }) {
|
|||||||
}),
|
}),
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
try {
|
|
||||||
await enhanceProfiles();
|
|
||||||
showNotice.success("settings.modals.tun.messages.applied");
|
|
||||||
} catch (err: any) {
|
|
||||||
showNotice.error(err);
|
|
||||||
}
|
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
|
showNotice.success("settings.modals.tun.messages.applied");
|
||||||
|
void enhanceProfiles().catch((err: any) => {
|
||||||
|
showNotice.error(err);
|
||||||
|
});
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
showNotice.error(err);
|
showNotice.error(err);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user