mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
simplify events
This commit is contained in:
parent
e3da07141c
commit
b3480eb70b
@ -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) {
|
||||
|
@ -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" };
|
||||
|
Loading…
Reference in New Issue
Block a user