New state for Update Dialog

This commit is contained in:
Fedor Indutny 2023-03-15 09:57:27 -07:00 committed by GitHub
parent 5949cc11b1
commit a1ab62f878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 93 additions and 29 deletions

View file

@ -260,9 +260,15 @@ export abstract class Updater {
const mainWindow = this.getMainWindow();
if (mainWindow) {
logger.info('downloadAndInstall: showing update dialog...');
mainWindow.webContents.send('show-update-dialog', DialogType.Update, {
version: this.version,
});
mainWindow.webContents.send(
'show-update-dialog',
mode === DownloadMode.Automatic
? DialogType.AutoUpdate
: DialogType.DownloadedUpdate,
{
version: this.version,
}
);
} else {
logger.warn(
'downloadAndInstall: no mainWindow, cannot show update dialog'