Refactoring

This commit is contained in:
Scott E. Graves
2019-06-07 15:36:12 -05:00
parent 704a357dd0
commit 5c931bb66d

View File

@@ -128,16 +128,16 @@ class App extends IPCContainer {
this.props.downloadItem(name, Constants.INSTALL_TYPES.Upgrade, url, this.onDownloadFileComplete); this.props.downloadItem(name, Constants.INSTALL_TYPES.Upgrade, url, this.onDownloadFileComplete);
}; };
installDependency = data => { installDependency = result => {
if (data.Success) { if (result.Success) {
this.props.installDependency(data.Destination, data.URL, this.onInstallDependencyComplete); this.props.installDependency(result.Destination, result.URL, this.onInstallDependencyComplete);
} }
}; };
installRelease = data => { installRelease = result => {
if (data.Success) { if (result.Success) {
const selectedVersion = this.getSelectedVersion(); const selectedVersion = this.getSelectedVersion();
this.props.installRelease(data.Destination, selectedVersion, () => { this.props.installRelease(result.Destination, selectedVersion, () => {
if (this.isMounted()) { if (this.isMounted()) {
this.checkVersionInstalled(); this.checkVersionInstalled();
} }
@@ -145,11 +145,11 @@ class App extends IPCContainer {
} }
}; };
installUpgrade = data => { installUpgrade = result => {
if (data.Success) { if (result.Success) {
const sha256 = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]].sha256; const sha256 = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]].sha256;
const signature = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]].sig; const signature = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]].sig;
this.props.installUpgrade(data.Destination, sha256, signature, !!data.SkipVerification, this.onInstallUpgradeComplete); this.props.installUpgrade(result.Destination, sha256, signature, !!result.SkipVerification, this.onInstallUpgradeComplete);
} }
}; };