Refactoring
This commit is contained in:
18
src/App.js
18
src/App.js
@@ -128,16 +128,16 @@ class App extends IPCContainer {
|
||||
this.props.downloadItem(name, Constants.INSTALL_TYPES.Upgrade, url, this.onDownloadFileComplete);
|
||||
};
|
||||
|
||||
installDependency = data => {
|
||||
if (data.Success) {
|
||||
this.props.installDependency(data.Destination, data.URL, this.onInstallDependencyComplete);
|
||||
installDependency = result => {
|
||||
if (result.Success) {
|
||||
this.props.installDependency(result.Destination, result.URL, this.onInstallDependencyComplete);
|
||||
}
|
||||
};
|
||||
|
||||
installRelease = data => {
|
||||
if (data.Success) {
|
||||
installRelease = result => {
|
||||
if (result.Success) {
|
||||
const selectedVersion = this.getSelectedVersion();
|
||||
this.props.installRelease(data.Destination, selectedVersion, () => {
|
||||
this.props.installRelease(result.Destination, selectedVersion, () => {
|
||||
if (this.isMounted()) {
|
||||
this.checkVersionInstalled();
|
||||
}
|
||||
@@ -145,11 +145,11 @@ class App extends IPCContainer {
|
||||
}
|
||||
};
|
||||
|
||||
installUpgrade = data => {
|
||||
if (data.Success) {
|
||||
installUpgrade = result => {
|
||||
if (result.Success) {
|
||||
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;
|
||||
this.props.installUpgrade(data.Destination, sha256, signature, !!data.SkipVerification, this.onInstallUpgradeComplete);
|
||||
this.props.installUpgrade(result.Destination, sha256, signature, !!result.SkipVerification, this.onInstallUpgradeComplete);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user