mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 09:15:33 +03:00
Prefs need to be awaited
This commit is contained in:
parent
8d91bfb0a3
commit
2f75dfd9e4
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue