 
 
   activate: (state) ->
-    @deactivateStream = new Bacon.Bus()
+    @deactivateBus = new Bacon.Bus()
 
     { addedStream, removedStream } = atoms.projectsPaths()
 


module.exports =
  panel: undefined
  deactivateStream: undefined
  subscriptions: []

  config:

    @subscriptions.push newBodyHeightStream.debounce(500).onValue (newHeight) ->
      atom.config.set('atom-notational.bodyHeight', newHeight)

    terminateProjectsProp = projectsProp.sampledBy(@deactivateBus)
    terminateProjectsProp.onValue (projects) ->
      for { task } in projects
        task.send('finish')
      return Bacon.noMore


  deactivate: ->
    @deactivateBus.push(true)
    unsubscribe() for unsubscribe in @subscriptions
    @panel?.destroy()
