MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / onUpdateStatus

Function onUpdateStatus

apps/desktop/src/preload/index.ts:84–90  ·  view source on GitHub ↗

* Subscribe to auto-update status changes pushed by main (available → * downloading → downloaded). Returns an unsubscribe function.

(callback: (status: DesktopUpdateStatus) => void)

Source from the content-addressed store, hash-verified

82 * downloading → downloaded). Returns an unsubscribe function.
83 */
84 onUpdateStatus(callback: (status: DesktopUpdateStatus) => void): () => void {
85 const listener = (_event: unknown, status: DesktopUpdateStatus) => callback(status);
86 ipcRenderer.on(UPDATE_STATUS_CHANNEL, listener);
87 return () => {
88 ipcRenderer.removeListener(UPDATE_STATUS_CHANNEL, listener);
89 };
90 },
91 /** Apply a downloaded update and restart the app. */
92 installUpdate(): Promise<void> {
93 return ipcRenderer.invoke(UPDATE_INSTALL_CHANNEL);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected