mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
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:
committed by
Samuel Attard
parent
b3d44dbe6f
commit
a6a028594d
@@ -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.'
|
||||
}
|
||||
|
||||
dialog.showMessageBox(dialogOpts, (response) => {
|
||||
if (response === 0) autoUpdater.quitAndInstall()
|
||||
dialog.showMessageBox(dialogOpts).then((returnValue) => {
|
||||
if (returnValue.response === 0) autoUpdater.quitAndInstall()
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user