Hook up prefetcher settings
Summary: This makes use of the previously set up new settings. The logic is a tiny bit difficult to follow so I wanted to make sure it's not lost in the noise of the previous diff. Reviewed By: jknoxville Differential Revision: D18036538 fbshipit-source-id: db3bbce4361862cee479aed70578a4bcbde2c46d
This commit is contained in:
committed by
Facebook Github Bot
parent
82a253cf28
commit
a77064ad84
11
src/init.tsx
11
src/init.tsx
@@ -77,7 +77,8 @@ const AppFrame = () => {
|
||||
};
|
||||
|
||||
function setProcessState(store: Store) {
|
||||
const androidHome = store.getState().settingsState.androidHome;
|
||||
const settings = store.getState().settingsState;
|
||||
const androidHome = settings.androidHome;
|
||||
|
||||
if (!process.env.ANDROID_HOME) {
|
||||
process.env.ANDROID_HOME = androidHome;
|
||||
@@ -89,6 +90,10 @@ function setProcessState(store: Store) {
|
||||
['emulator', 'tools', 'platform-tools']
|
||||
.map(directory => path.resolve(androidHome, directory))
|
||||
.join(':') + `:${process.env.PATH}`;
|
||||
|
||||
window.requestIdleCallback(() => {
|
||||
setupPrefetcher(settings);
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
@@ -96,10 +101,6 @@ function init() {
|
||||
initLauncherHooks(config(), store);
|
||||
const sessionId = store.getState().application.sessionId;
|
||||
initCrashReporter(sessionId || '');
|
||||
|
||||
window.requestIdleCallback(() => {
|
||||
setupPrefetcher();
|
||||
});
|
||||
}
|
||||
|
||||
// rehydrate app state before exposing init
|
||||
|
||||
Reference in New Issue
Block a user