Refactoring

This commit is contained in:
Scott E. Graves
2019-07-15 14:54:28 -05:00
parent d7759402f6
commit f006beb8d9
14 changed files with 261 additions and 355 deletions

View File

@@ -21,4 +21,26 @@ export const shutdownApplication = () => {
ipcRenderer.send(Constants.IPC_Shutdown);
}
};
};
export const saveState = () => {
return (dispatch, getState) => {
const state = getState();
if (state.common.AppReady) {
let currentState = {
Release: state.relver.Release,
Version: state.relver.Version,
};
for (const provider of Constants.PROVIDER_LIST) {
currentState[provider] = currentState.mounts.ProviderState[provider];
}
if (ipcRenderer) {
ipcRenderer.send(Constants.IPC_Save_State, {
State: currentState
});
}
}
};
};