   getElement: -> @element
 
   destroy: ->
-    @disposables.dispose()
+    @subscriptions.dispose()
     @emitter.emit 'did-destroy'
 
   onClick: (callback) ->

    @timestamp = document.createElement('div')
    @timestamp.classList.add('timestamp')
    @notification.moment = moment(@notification.getTimestamp())
    @disposables.add atom.tooltips.add(@timestamp, title: @notification.moment.format("ll LTS"))
    @updateTimestamp()
    @timestampInterval = setInterval(@updateTimestamp.bind(this), 60 * 1000)
    @disposables.add new Disposable => clearInterval @timestampInterval

    @element = document.createElement('li')
    @element.classList.add('notifications-log-item', @notification.getType())

moment = require 'moment'

module.exports = class NotificationsLogItem
  subscriptions: null
  timestampInterval: null

  constructor: (@notification) ->
    @emitter = new Emitter
    @subscriptions = new CompositeDisposable
    @render()

  render: ->
