diff --git a/index.js b/index.js index 8b6a056..c73f95a 100644 --- a/index.js +++ b/index.js @@ -245,13 +245,14 @@ function checkForUpdates() { autoUpdater.autoInstallOnAppQuit = false; autoUpdater.checkForUpdates(); autoUpdater.on("update-available", () => { - dialog.showMessageBox(mainWindow, { + settingsWindow.show(); + dialog.showMessageBox(settingsWindow, { title: "Update Available", message: "There's an update available for PresentationBridge Client. Do you want to download and install it?", buttons: ["Update", "Cancel"], }).then((v) => { if (v.response == 0) { - dialog.showMessageBox(mainWindow, { + dialog.showMessageBox(settingsWindow, { title: "Downloading update", message: "The update is being downloaded in the background. Once finished, you will be prompted to save your work and restart PresentationBridge Client." }); @@ -274,6 +275,13 @@ function checkForUpdates() { (async () => { await app.whenReady(); + + settingsWindow = await createsettingsWindow(); + monitorWindow = await createmonitorWindow(); + + tray = new Tray(path.join(__dirname,'Bridge-icon.png')); + buildTray(); + if (!is.development) { const FOUR_HOURS = 1000 * 60 * 60 * 4; setInterval(() => { @@ -281,11 +289,6 @@ function checkForUpdates() { }, FOUR_HOURS); checkForUpdates(); } - settingsWindow = await createsettingsWindow(); - monitorWindow = await createmonitorWindow(); - - tray = new Tray(path.join(__dirname,'Bridge-icon.png')); - buildTray(); if (config.get('switch_mdns')) { findHosts(); diff --git a/package.json b/package.json index 92ebd0f..b67e985 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "presentationbridge-client", "productName": "PresentationBridge Client", - "version": "1.0.9", + "version": "1.0.10", "description": "Links data from your Presentation / lyrics software to other software.", "license": "MIT", "repository": "josephdadams/presentationbridge-client",