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