perf: optimized response speed

This commit is contained in:
MystiPanda
2024-07-08 00:29:49 +08:00
parent 9dde385073
commit e371bbedc0
2 changed files with 27 additions and 14 deletions

View File

@@ -171,10 +171,11 @@ const ProfilePage = () => {
}, 100);
try {
await patchProfiles({ current });
mutateLogs();
await mutateLogs();
closeAllConnections();
setTimeout(() => activateSelected(), 2000);
Notice.success(t("Profile Switched"), 1000);
activateSelected().then(() => {
Notice.success(t("Profile Switched"), 1000);
});
} catch (err: any) {
Notice.error(err?.message || err.toString(), 4000);
} finally {