mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Delay our call to quitAndInstall(); doesn't work inside callback (#1866)
This commit is contained in:
@@ -40,8 +40,13 @@ function showUpdateDialog(mainWindow, messages) {
|
||||
|
||||
dialog.showMessageBox(mainWindow, options, function(response) {
|
||||
if (response == RESTART_BUTTON) {
|
||||
windowState.markShouldQuit();
|
||||
autoUpdater.quitAndInstall();
|
||||
// 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();
|
||||
autoUpdater.quitAndInstall();
|
||||
}, 200);
|
||||
}
|
||||
|
||||
showingDialog = false;
|
||||
|
||||
Reference in New Issue
Block a user