Prefs need to be awaited
This commit is contained in:
parent
8d91bfb0a3
commit
2f75dfd9e4
|
@ -325,11 +325,11 @@ function App() {
|
||||||
|
|
||||||
const client = initClient({ instance: instanceURL, accessToken });
|
const client = initClient({ instance: instanceURL, accessToken });
|
||||||
await Promise.allSettled([
|
await Promise.allSettled([
|
||||||
|
initPreferences(client),
|
||||||
initInstance(client, instanceURL),
|
initInstance(client, instanceURL),
|
||||||
initAccount(client, instanceURL, accessToken, vapidKey),
|
initAccount(client, instanceURL, accessToken, vapidKey),
|
||||||
]);
|
]);
|
||||||
initStates();
|
initStates();
|
||||||
initPreferences(client);
|
|
||||||
|
|
||||||
setIsLoggedIn(true);
|
setIsLoggedIn(true);
|
||||||
setUIState('default');
|
setUIState('default');
|
||||||
|
@ -343,10 +343,10 @@ function App() {
|
||||||
const { instance } = client;
|
const { instance } = client;
|
||||||
// console.log('masto', masto);
|
// console.log('masto', masto);
|
||||||
initStates();
|
initStates();
|
||||||
initPreferences(client);
|
|
||||||
setUIState('loading');
|
setUIState('loading');
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
|
await initPreferences(client);
|
||||||
await initInstance(client, instance);
|
await initInstance(client, instance);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in a new issue