Refactoring start-up

This commit is contained in:
2020-12-12 12:34:50 -06:00
parent 1fedb94157
commit 7e0f06ba56
2 changed files with 3 additions and 3 deletions

View File

@@ -110,7 +110,7 @@ class App extends IPCContainer {
const remoteSupported = this.props.LocationsLookup[selectedVersion] && const remoteSupported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].supports_remote; this.props.LocationsLookup[selectedVersion].supports_remote;
let s3Supported = this.props.LocationsLookup[selectedVersion] && const s3Supported = this.props.LocationsLookup[selectedVersion] &&
this.props.LocationsLookup[selectedVersion].s3_support; this.props.LocationsLookup[selectedVersion].s3_support;
const skynetSupported = this.props.LocationsLookup[selectedVersion] && const skynetSupported = this.props.LocationsLookup[selectedVersion] &&

View File

@@ -26,14 +26,13 @@ if (ipcRenderer) {
ipcRenderer.once(Constants.IPC_Get_State_Reply, (event, result) => { ipcRenderer.once(Constants.IPC_Get_State_Reply, (event, result) => {
if (result.data) { if (result.data) {
store = createAppStore(platformInfo, packageJson.version, result.data); store = createAppStore(platformInfo, packageJson.version, result.data);
store.dispatch(setActiveRelease(result.data.Release, result.data.Version));
const providerList = [ const providerList = [
...Constants.PROVIDER_LIST, ...Constants.PROVIDER_LIST,
...store.getState().mounts.RemoteMounts, ...store.getState().mounts.RemoteMounts,
...store.getState().mounts.S3Mounts, ...store.getState().mounts.S3Mounts,
]; ];
for (const provider of providerList) { for (const provider of providerList) {
let state = result.data[provider] || store.getState().mounts.ProviderState[provider]; const state = result.data[provider];
if (state.AutoMount === undefined) { if (state.AutoMount === undefined) {
state['AutoMount'] = false; state['AutoMount'] = false;
} }
@@ -42,6 +41,7 @@ if (ipcRenderer) {
} }
store.dispatch(setProviderState(provider, state)); store.dispatch(setProviderState(provider, state));
} }
store.dispatch(setActiveRelease(result.data.Release, result.data.Version));
} else { } else {
store = createAppStore(platformInfo, packageJson.version, {}); store = createAppStore(platformInfo, packageJson.version, {});
} }