Use onDidCompleteDownloadingUpdate in listenForUpdates

This gets a bit confusing… It was formerly 
`@applicationDelegate.onUpdateAvailable`, but `::onUpdateAvailable` 
listens for the `did-begin-downloading-update` event and 
`::onDidCompleteDownloadingUpdate` listens for the `update-available` 
event. Note that ‘available’ here means successfully downloaded and 
ready to be used and NOT available to be downloaded.
This commit is contained in:
Katrina Uychaco
2016-02-19 15:35:42 -08:00
committed by Ben Ogle
parent 19d30c7dc9
commit dd53c6f856

View File

@@ -891,7 +891,8 @@ class AtomEnvironment extends Model
@emitter.emit 'update-available', details
listenForUpdates: ->
@disposables.add(@applicationDelegate.onUpdateAvailable(@updateAvailable.bind(this)))
# listen for updates available locally (that have been successfully downloaded)
@disposables.add(@applicationDelegate.onDidCompleteDownloadingUpdate(@updateAvailable.bind(this)))
setBodyPlatformClass: ->
@document.body.classList.add("platform-#{process.platform}")