修复更新中心发送的下载项和普通下载故障覆盖的问题

This commit is contained in:
2026-04-13 13:29:58 +08:00
parent 763af5c37e
commit f044c6c3df
18 changed files with 981 additions and 39 deletions

View File

@@ -41,6 +41,10 @@ type IpcRendererFacade = {
};
type UpdateCenterStateListener = (snapshot: UpdateCenterSnapshot) => void;
type UpdateCenterStartTask = {
taskKey: string;
id: number;
};
const updateCenterStateListeners = new Map<
UpdateCenterStateListener,
@@ -98,8 +102,8 @@ contextBridge.exposeInMainWorld("updateCenter", {
packageName: string;
newVersion: string;
}): Promise<void> => ipcRenderer.invoke("update-center-unignore", payload),
start: (taskKeys: string[]): Promise<void> =>
ipcRenderer.invoke("update-center-start", taskKeys),
start: (tasks: UpdateCenterStartTask[]): Promise<void> =>
ipcRenderer.invoke("update-center-start", tasks),
cancel: (taskKey: string): Promise<void> =>
ipcRenderer.invoke("update-center-cancel", taskKey),
getState: (): Promise<UpdateCenterSnapshot> =>