Enable "Downloading Update" context menu entry

Previously 'update-downloaded' would get emitted right after 'update-available' which would suppress the "Downloading Update" menu entry
This commit is contained in:
Wliu 2015-06-07 11:23:42 -04:00
parent 2a71c4edfa
commit ca72b802ac

View File

@ -14,6 +14,8 @@ class AutoUpdater
require('auto-updater').quitAndInstall()
downloadUpdate: (callback) ->
@emit 'update-available'
SquirrelUpdate.spawn ['--download', @updateUrl], (error, stdout) ->
return callback(error) if error?
@ -56,7 +58,6 @@ class AutoUpdater
@emit 'update-not-available'
return
@emit 'update-available'
@emit 'update-downloaded', {}, update.releaseNotes, update.version, new Date(), 'https://atom.io', => @quitAndInstall()
module.exports = new AutoUpdater()