Add ipc "have-been-updated"

This commit is contained in:
Shidorien
2023-11-24 02:53:36 +01:00
parent 8c9846d751
commit 34c0ad03d3
+10 -2
View File
@@ -2,9 +2,10 @@
import { LaunchOption } from "shared/models/bs-launch";
import { BSLauncherService } from "../services/bs-launcher/bs-launcher.service"
import { IpcService } from '../services/ipc.service';
import { from } from "rxjs";
import { from, of } from "rxjs";
import { SteamLauncherService } from "../services/bs-launcher/steam-launcher.service";
import { OculusLauncherService } from "../services/bs-launcher/oculus-launcher.service";
import { AutoUpdaterService } from "../services/auto-updater.service";
const ipc = IpcService.getInstance();
@@ -29,4 +30,11 @@ ipc.on<void>("restore-original-oculus-folder", (_, reply) => {
reply(from(
oculusLauncher.deleteBsSymlinks().then(() => oculusLauncher.restoreOriginalBeatSaber())
));
})
});
ipc.on<boolean>("have-been-updated", (_, reply) => {
const updaterService = AutoUpdaterService.getInstance();
reply(of(updaterService.getHaveBeenUpdated()));
});