 
   onDidCompleteDownloadingUpdate: (callback) ->
     outerCallback = (event, message, detail) ->
-      if message is 'update-available'
-        callback(detail)
+      callback(detail) if message is 'update-available'
 
     ipcRenderer.on('message', outerCallback)
     new Disposable ->


  onUpdateNotAvailable: (callback) ->
    outerCallback = (event, message, detail) ->
      if message is 'update-not-available'
        callback(detail)

    ipcRenderer.on('message', outerCallback)
    new Disposable ->
      ipcRenderer.removeListener('message', outerCallback)


  onApplicationMenuCommand: (callback) ->
    outerCallback = (event, args...) ->


  onDidOpenLocations: (callback) ->
    outerCallback = (event, message, detail) ->
      callback(detail) if message is 'open-locations'

    ipcRenderer.on('message', outerCallback)
    new Disposable ->
