Skip to content

Commit

Permalink
Fixes autoupdate notification
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpethick committed Feb 15, 2018
1 parent 282f879 commit 75aa867
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
const path = require('path');
const MenuBar = require('menubar');
const AutoLaunch = require('auto-launch');
const autoUpdater = require("electron-updater").autoUpdater
const electron = require('electron');
const dialog = electron.dialog;
const ipcMain = electron.ipcMain;
const startupHandler = require('./startupHandler');

if (process.env.NODE_ENV === 'development')
const autoUpdater = require("electron-updater").autoUpdater
// autoUpdater.logger = require("electron-log");
// autoUpdater.logger.transports.file.level = "info";

// if (process.env.NODE_ENV === 'development')
require('electron-debug')();

electron.crashReporter.start({
Expand Down Expand Up @@ -81,7 +84,7 @@ ipcMain.on('check-update', event => {
// `status` returns true if there is a new update available
autoUpdater.checkForUpdatesAndNotify()
.then(result => {
if (result == null)
event.sender.send('check-update-response', false);
const isUpdating = result.cancellationToken;
event.sender.send('check-update-response', isUpdating);
});
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"cron": "^1.1.0",
"electron-debug": "^0.5.0",
"electron-gh-releases": "^2.0.3",
"electron-log": "^2.2.14",
"electron-updater": "^2.20.1",
"file-loader": "^0.8.5",
"form-data": "^0.2.0",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,10 @@ electron-localshortcut@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/electron-localshortcut/-/electron-localshortcut-0.6.1.tgz#c4e268c38a6e42f40de5618fc906d1ed608f11aa"

electron-log@^2.2.14:
version "2.2.14"
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-2.2.14.tgz#2123319ccb8d70b0db07f0eda57d5823cb42b4b0"

[email protected]:
version "0.4.8"
resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.8.tgz#f0b9fadded9e1e54ec35fa89877b5c6c34c7bc40"
Expand Down

0 comments on commit 75aa867

Please sign in to comment.