Delay our call to quitAndInstall(); doesn't work inside callback (#1866)
This commit is contained in:
parent
1432d9853b
commit
e96502ba5e
1 changed files with 7 additions and 2 deletions
|
@ -40,8 +40,13 @@ function showUpdateDialog(mainWindow, messages) {
|
||||||
|
|
||||||
dialog.showMessageBox(mainWindow, options, function(response) {
|
dialog.showMessageBox(mainWindow, options, function(response) {
|
||||||
if (response == RESTART_BUTTON) {
|
if (response == RESTART_BUTTON) {
|
||||||
|
// We delay these update calls because they don't seem to work in this
|
||||||
|
// callback - but only if the message box has a parent window.
|
||||||
|
// Fixes this bug: https://github.com/WhisperSystems/Signal-Desktop/issues/1864
|
||||||
|
setTimeout(function() {
|
||||||
windowState.markShouldQuit();
|
windowState.markShouldQuit();
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
showingDialog = false;
|
showingDialog = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue