π Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.
TypeScript aielectronesrgangigapixelgigapixel-imagesimageimage-upscalingtopazupscaleupscalerimageupscayl
Refactor auto-update dialog handling #589
Nayam Amarshe305822eb5ca1
diff --git a/electron/commands/auto-update.ts b/electron/commands/auto-update.tsindex 1a34de9..d9770c6 100644--- a/electron/commands/auto-update.ts+++ b/electron/commands/auto-update.ts@@ -12,18 +12,19 @@ const autoUpdate = (event: UpdateDownloadedEvent) => {detail:"A new version has been downloaded. Restart the application to apply the updates.",};++ const dialogResponse = dialog.showMessageBoxSync(dialogOpts);+logit("β Update Downloaded");- dialog.showMessageBox(dialogOpts).then((returnValue) => {- if (returnValue.response === 0) {- autoUpdater.quitAndInstall();- } else if (returnValue.response === 2) {- shell.openExternal(- "https://github.com/upscayl/upscayl/releases/tag/v" + event.version- );- } else {- logit("π« Update Installation Cancelled");- }- });+ if (dialogResponse === 0) {+ autoUpdater.quitAndInstall();+ } else if (dialogResponse === 2) {+ shell.openExternal(+ "https://github.com/upscayl/upscayl/releases/tag/v" + event.version+ );+ } else {+ logit("π« Update Installation Cancelled");+ }};export default autoUpdate;