From 2f75dfd9e430e28e7afc28145ecca032216329ea Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 7 Jun 2024 18:41:04 +0800 Subject: [PATCH] Prefs need to be awaited --- src/app.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index 0e9a52ca..446ecbc5 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -325,11 +325,11 @@ function App() { const client = initClient({ instance: instanceURL, accessToken }); await Promise.allSettled([ + initPreferences(client), initInstance(client, instanceURL), initAccount(client, instanceURL, accessToken, vapidKey), ]); initStates(); - initPreferences(client); setIsLoggedIn(true); setUIState('default'); @@ -343,10 +343,10 @@ function App() { const { instance } = client; // console.log('masto', masto); initStates(); - initPreferences(client); setUIState('loading'); (async () => { try { + await initPreferences(client); await initInstance(client, instance); } catch (e) { } finally {