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);
|
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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user