[client-app] Make sure to fetch latest update url every time we check for updates

Summary:
Previously, is you signed out of your NylasID, you would not pick up new
updates because we never updated the autoupdater url to use the new id.

Test Plan: manual

Reviewers: mark, halla, evan

Reviewed By: halla, evan

Differential Revision: https://phab.nylas.com/D4346
This commit is contained in:
Juan Tejada 2017-04-04 15:07:23 -07:00
parent d1b81b6afe
commit 7d99567855

View file

@ -30,11 +30,6 @@ export default class AutoUpdateManager extends EventEmitter {
this.updateFeedURL();
this.config.onDidChange(
'nylas.accounts',
this.updateFeedURL
);
setTimeout(() => this.setupAutoUpdater(), 0);
}
@ -157,6 +152,7 @@ export default class AutoUpdateManager extends EventEmitter {
}
check({hidePopups} = {}) {
this.updateFeedURL();
if (!hidePopups) {
autoUpdater.once('update-not-available', this.onUpdateNotAvailable);
autoUpdater.once('error', this.onUpdateError);