Don't show 'new update available' dialog if it's already showing

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-21 12:07:37 -07:00
parent f9c4342fc2
commit 80fd70de13
No known key found for this signature in database
GPG key ID: A4931C09644C654B

View file

@ -19,7 +19,13 @@ function checkForUpdates() {
autoUpdater.checkForUpdates();
}
var showingDialog = false;
function showUpdateDialog() {
if (showingDialog) {
return;
}
showingDialog = true;
const options = {
type: 'info',
buttons: [
@ -38,6 +44,8 @@ function showUpdateDialog() {
windowState.markShouldQuit();
autoUpdater.quitAndInstall();
}
showingDialog = false;
});
}