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:
Cyril POIDEVIN 2019-11-18 09:49:50 +01:00 committed by Samuel Attard
parent b3d44dbe6f
commit a6a028594d

View file

@ -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()
})
})
```