* Subscribe to auto-update status changes pushed by main (available → * downloading → downloaded). Returns an unsubscribe function.
(callback: (status: DesktopUpdateStatus) => void)
| 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); |
nothing calls this directly
no outgoing calls
no test coverage detected