* Prompts the user to install the downloaded application update and restarts the application
()
| 179 | * Prompts the user to install the downloaded application update and restarts the application |
| 180 | */ |
| 181 | async promptToInstallUpdate() { |
| 182 | const dialogOpts: Electron.MessageBoxOptions = { |
| 183 | type: "info", |
| 184 | buttons: ["Restart", "Later"], |
| 185 | title: "Application Update", |
| 186 | message: process.platform === "win32" ? this.availableUpdateReleaseNotes : this.availableUpdateReleaseName, |
| 187 | detail: "A new version has been downloaded. Restart the application to apply the updates.", |
| 188 | }; |
| 189 | |
| 190 | const allWindows = getAllWaveWindows(); |
| 191 | if (allWindows.length > 0) { |
| 192 | await dialog.showMessageBox(focusedWaveWindow ?? allWindows[0], dialogOpts).then(({ response }) => { |
| 193 | if (response === 0) { |
| 194 | fireAndForget(this.installUpdate.bind(this)); |
| 195 | } |
| 196 | }); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Restarts the app and installs an update if it is available. |
nothing calls this directly
no test coverage detected