Merge pull request #49 from Zagrios/hotfix/link-maps-by-default

hotfix/link-maps-by-default
This commit is contained in:
MathieuG-P
2022-12-29 15:13:09 +01:00
committed by GitHub
+3 -1
View File
@@ -5,6 +5,7 @@ import { IpcRequest } from 'shared/models/ipc';
import { InstallationLocationService } from '../services/installation-location.service';
import { UtilsService } from '../services/utils.service';
import { BsmException } from 'shared/models/bsm-exception.model';
import { LocalMapsManagerService } from '../services/additional-content/local-maps-manager.service';
export interface InitDownloadInfoInterface {
@@ -25,7 +26,8 @@ export interface DownloadInfo {
}
ipcMain.on('bs-download.start', async (event, request: IpcRequest<DownloadInfo>) => {
BSInstallerService.getInstance().downloadBsVersion(request.args).then(res => {
BSInstallerService.getInstance().downloadBsVersion(request.args).then(async res => {
await LocalMapsManagerService.getInstance().linkVersionMaps(request.args.bsVersion, true).catch(e => {});
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res});
}).catch(e => {
UtilsService.getInstance().ipcSend(request.responceChannel, {success: false, data: e});