docs: Use Promise for dialog.showMessageBox
(#21143)
* Update updates.md Use of the return promise for the use of `dialog.showMessageBox`. * Update updates.md
This commit is contained in:
parent
b3d44dbe6f
commit
a6a028594d
1 changed files with 2 additions and 2 deletions
|
@ -123,8 +123,8 @@ autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
|
||||||
detail: 'A new version has been downloaded. Restart the application to apply the updates.'
|
detail: 'A new version has been downloaded. Restart the application to apply the updates.'
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.showMessageBox(dialogOpts, (response) => {
|
dialog.showMessageBox(dialogOpts).then((returnValue) => {
|
||||||
if (response === 0) autoUpdater.quitAndInstall()
|
if (returnValue.response === 0) autoUpdater.quitAndInstall()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue