simplify events

This commit is contained in:
Zamitto 2024-05-21 17:04:06 -03:00
parent e3da07141c
commit b3480eb70b
2 changed files with 6 additions and 6 deletions

View File

@ -22,8 +22,8 @@ const checkForUpdates = async (_event: Electron.IpcMainInvokeEvent) => {
.addListener("checking-for-update", () => {
sendEvent({ type: "checking-for-updates" });
})
.addListener("update-not-available", (info: UpdateInfo) => {
sendEvent({ type: "update-not-available", info });
.addListener("update-not-available", () => {
sendEvent({ type: "update-not-available" });
})
.addListener("update-available", (info: UpdateInfo) => {
sendEvent({ type: "update-available", info });
@ -34,8 +34,8 @@ const checkForUpdates = async (_event: Electron.IpcMainInvokeEvent) => {
.addListener("download-progress", (info: ProgressInfo) => {
sendEvent({ type: "download-progress", info });
})
.addListener("update-cancelled", (info: UpdateInfo) => {
sendEvent({ type: "update-cancelled", info });
.addListener("update-cancelled", () => {
sendEvent({ type: "update-cancelled" });
});
if (app.isPackaged) {

View File

@ -148,8 +148,8 @@ export interface SteamGame {
export type AppUpdaterEvents =
| { type: "error" }
| { type: "checking-for-updates" }
| { type: "update-not-available"; info: UpdateInfo }
| { type: "update-not-available" }
| { type: "update-available"; info: UpdateInfo }
| { type: "update-downloaded" }
| { type: "download-progress"; info: ProgressInfo }
| { type: "update-cancelled"; info: UpdateInfo };
| { type: "update-cancelled" };