From dd53c6f85644701cd0c6b61e7cfca5c69d098df0 Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Fri, 19 Feb 2016 15:35:42 -0800 Subject: [PATCH] Use `onDidCompleteDownloadingUpdate` in `listenForUpdates` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/atom-environment.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 31562a392..b9527b947 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -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}")