Put 'update-available' in @downloadUpdate instead

So that it only shows up when there's an actual update
This commit is contained in:
Wliu
2015-06-07 11:33:26 -04:00
parent ca72b802ac
commit 9e6e05a5a6

View File

@@ -14,8 +14,6 @@ class AutoUpdater
require('auto-updater').quitAndInstall()
downloadUpdate: (callback) ->
@emit 'update-available'
SquirrelUpdate.spawn ['--download', @updateUrl], (error, stdout) ->
return callback(error) if error?
@@ -53,6 +51,8 @@ class AutoUpdater
@emit 'update-not-available'
return
@emit 'update-available'
@installUpdate (error) =>
if error?
@emit 'update-not-available'