hopefully make the page load faster
All checks were successful
deploy / deploy (push) Successful in 53s
All checks were successful
deploy / deploy (push) Successful in 53s
This commit is contained in:
parent
af4c117894
commit
2303409ecb
@ -21,19 +21,23 @@ export default class AppProvider extends React.Component {
|
|||||||
}
|
}
|
||||||
this._state.mounted = true;
|
this._state.mounted = true;
|
||||||
|
|
||||||
// Load data from async storage
|
const initUpdater = async () => {
|
||||||
await useSettingsStore.persist.rehydrate();
|
// Load data from async storage
|
||||||
await useScoresaberScoresStore.persist.rehydrate();
|
await useSettingsStore.persist.rehydrate();
|
||||||
|
await useScoresaberScoresStore.persist.rehydrate();
|
||||||
|
|
||||||
await useSettingsStore.getState().refreshProfiles();
|
await useSettingsStore.getState().refreshProfiles();
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
useSettingsStore.getState().refreshProfiles();
|
useSettingsStore.getState().refreshProfiles();
|
||||||
}, UPDATE_INTERVAL);
|
}, UPDATE_INTERVAL);
|
||||||
|
|
||||||
await useScoresaberScoresStore.getState().updatePlayerScores();
|
await useScoresaberScoresStore.getState().updatePlayerScores();
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
useScoresaberScoresStore.getState().updatePlayerScores();
|
useScoresaberScoresStore.getState().updatePlayerScores();
|
||||||
}, UPDATE_INTERVAL);
|
}, UPDATE_INTERVAL);
|
||||||
|
};
|
||||||
|
|
||||||
|
initUpdater();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props: any) {
|
constructor(props: any) {
|
||||||
|
Loading…
Reference in New Issue
Block a user