perf(tun-viewer): run enhanceProfiles in background to avoid save blocking

This commit is contained in:
Slinetrac
2026-01-08 14:03:00 +08:00
parent 1889f18183
commit 13855b9bc2

View File

@@ -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);
}