4
0
mirror of https://github.com/AltarikMC/Launcher synced 2024-11-25 06:49:51 +01:00

Removed dialog when update downloaded

This commit is contained in:
Quentin Legot 2022-08-20 11:16:06 +02:00
parent 0001b54e15
commit 03a4e345d1

View File

@ -31,20 +31,9 @@ class Updater {
// TODO : replace dialog by automatic restart // TODO : replace dialog by automatic restart
this.autoUpdater.on('update-downloaded', (_event, releaseNotes, releaseName) => { this.autoUpdater.on('update-downloaded', (_event, releaseNotes, releaseName) => {
const dialogOpts = { this.logger.info(`update downloaded ${releaseName}`)
type: 'info',
buttons: ['Rédémarrer', 'Plus tard'],
title: 'Une mise à jour du launcher est disponible',
message: process.platform === 'win32' ? releaseNotes : releaseName,
detail: 'Une nouvelle version du launcher a été téléchargé. Redémarrez l\'application pour appliquer les mises à jour.'
}
this.dialog.showMessageBox(dialogOpts).then((returnValue) => {
if (returnValue.response === 0) {
this.logger.info("Leaving application to install update...") this.logger.info("Leaving application to install update...")
this.autoUpdater.quitAndInstall() this.autoUpdater.quitAndInstall()
}
})
}) })
} }