Skip to content

Commit

Permalink
fix: only check updates, don't use built in notify
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwinter committed Jun 10, 2021
1 parent 1e54361 commit 2030c16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion auto-update-stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AutoUpdateStub extends EventEmitter {
}
}

checkForUpdatesAndNotify() {
checkForUpdates() {
if (this.downloadAvailable) {
this.emit('update-downloaded');
} else {
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class ElectronAutoUpdate {
this.logger.info(`Will check again in ${this.checkFrequency} milliseconds`);

setTimeout(() => {
this.autoUpdater.checkForUpdatesAndNotify();
this.autoUpdater.checkForUpdates();
}, this.checkFrequency);
});

this.autoUpdater.checkForUpdatesAndNotify();
this.autoUpdater.checkForUpdates();
}

async updateDownloaded() {
Expand All @@ -68,7 +68,7 @@ class ElectronAutoUpdate {
this.logger.info('Will remind later to install update');

setTimeout(() => {
this.autoUpdater.checkForUpdatesAndNotify();
this.autoUpdater.checkForUpdates();
}, this.checkFrequency);
}
}
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('checks for updates at the frequency specified', t => {
checkFrequency: 5,
electronUpdater: {
autoUpdater: {
checkForUpdatesAndNotify: checkSpy,
checkForUpdates: checkSpy,
on: (eventName, fn) => {
if (eventName === 'update-not-available') {
fn();
Expand Down

0 comments on commit 2030c16

Please sign in to comment.