Skip to content

Commit

Permalink
Merge pull request #14 from jrviz/master
Browse files Browse the repository at this point in the history
Fix for autoupdater
  • Loading branch information
jrviz authored Nov 22, 2021
2 parents 0736f25 + 7c22d8d commit 27da7cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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."
});
Expand All @@ -274,18 +275,20 @@ 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(() => {
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();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 27da7cd

Please sign in to comment.