From 9031da2768eb4f3ac1ba16f9107e42c60768ab79 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 16 Sep 2024 15:17:57 +0800 Subject: [PATCH] Parallelize the inits --- src/app.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index 7fc8f604..2e8f99f0 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -410,8 +410,10 @@ function App() { setUIState('loading'); (async () => { try { - await initPreferences(client); - await initInstance(client, instance); + await Promise.allSettled([ + initPreferences(client), + initInstance(client, instance), + ]); } catch (e) { } finally { setIsLoggedIn(true);