not launch when lunch state is set

This commit is contained in:
MathieuG-P
2022-10-15 18:23:46 +02:00
parent 7f37433819
commit 47314ffbfa
@@ -42,6 +42,7 @@ export class BSLauncherService{
public launch(version: BSVersion, oculus: boolean, desktop: boolean, debug: boolean): Promise<NotificationResult|string>{
const lauchOption: LauchOption = {debug, oculus, desktop, version};
if(this.launchState$.value){ return this.notificationService.notifyError({title: "notifications.bs-launch.errors.titles.BS_ALREADY_RUNNING"}); }
this.launchState$.next(version);
return this.ipcService.send<LaunchResult>("bs-launch.launch", {args: lauchOption}).then(res => {