[chore-245] clean "setInstallationDirectory" process

This commit is contained in:
MathieuG-P
2023-07-16 15:10:00 +02:00
parent cab6a90c78
commit 2d7b1bd8f3
4 changed files with 37 additions and 47 deletions
@@ -1,5 +1,5 @@
import { DownloadEvent, DownloadInfo } from "main/services/bs-installer.service";
import { BehaviorSubject } from "rxjs";
import { BehaviorSubject, Observable } from "rxjs";
import { distinctUntilChanged, filter, throttleTime } from "rxjs/operators";
import { IpcResponse } from "shared/models/ipc";
import { BSVersion } from "shared/bs-version.interface";
@@ -197,8 +197,8 @@ export class BsDownloaderService {
return this._isVerification;
}
public setInstallationFolder(path: string): Promise<IpcResponse<string>> {
return this.ipcService.send<string>("bs-download.set-installation-folder", { args: path });
public setInstallationFolder(path: string): Observable<string> {
return this.ipcService.sendV2<string>("bs-download.set-installation-folder", { args: path });
}
public async importVersion(pathToImport: string): Promise<boolean> {