Remove release notes from event payload

The release notes are provided by Squirrel on Mac but not by Squirrel for
Windows and the release notes package pulls them down manually anyway
so this field is no longer needed.

Checking for the presence of the release notes previously was preventing the
event from firing on Windows which would cause old release notes to show in
the package.

Closes #3757
This commit is contained in:
Kevin Sawicki 2015-02-03 14:52:59 -08:00
parent 37a85bcdd0
commit a4976c32ae
3 changed files with 6 additions and 7 deletions

View File

@ -47,9 +47,8 @@ describe "the `atom` global", ->
updateAvailableHandler.callCount > 0
runs ->
{releaseVersion, releaseNotes} = updateAvailableHandler.mostRecentCall.args[0]
{releaseVersion} = updateAvailableHandler.mostRecentCall.args[0]
expect(releaseVersion).toBe 'version'
expect(releaseNotes).toBe 'notes'
describe "loading default config", ->
it 'loads the default core config', ->

View File

@ -47,7 +47,7 @@ class AutoUpdateManager
@setState(ErrorState)
console.error "Error Downloading Update: #{message}"
autoUpdater.on 'update-downloaded', (event, @releaseNotes, @releaseVersion) =>
autoUpdater.on 'update-downloaded', (event, releaseNotes, @releaseVersion) =>
@setState(UpdateAvailableState)
@emitUpdateAvailableEvent(@getWindows()...)
@ -61,9 +61,9 @@ class AutoUpdateManager
@setState(UnsupportedState)
emitUpdateAvailableEvent: (windows...) ->
return unless @releaseVersion? and @releaseNotes
return unless @releaseVersion?
for atomWindow in windows
atomWindow.sendMessage('update-available', {@releaseVersion, @releaseNotes})
atomWindow.sendMessage('update-available', {@releaseVersion})
setState: (state) ->
return if @state is state

View File

@ -31,8 +31,8 @@ class WindowEventHandler
atom.updateAvailable(detail)
# FIXME: Remove this when deprecations are removed
{releaseVersion, releaseNotes} = detail
detail = [releaseVersion, releaseNotes]
{releaseVersion} = detail
detail = [releaseVersion]
if workspaceElement = atom.views.getView(atom.workspace)
atom.commands.dispatch workspaceElement, "window:update-available", detail