_ = require 'underscore' React = require 'react' {Actions, Utils, Thread, AddRemoveTagsTask, NamespaceStore} = require 'nylas-exports' class ThreadListQuickActions extends React.Component @displayName: 'ThreadListQuickActions' @propTypes: thread: React.PropTypes.object render: => actions = [] actions.push
actions.push
if not @props.thread.hasTagId('archive') actions.push
{actions}
shouldComponentUpdate: (newProps, newState) -> newProps.thread.id isnt @props?.thread.id _onForward: (event) => Actions.composeForward({thread: @props.thread, popout: true}) # Don't trigger the thread row click event.stopPropagation() _onReply: (event) => Actions.composeReply({thread: @props.thread, popout: true}) # Don't trigger the thread row click event.stopPropagation() _onArchive: (event) => Actions.queueTask(new AddRemoveTagsTask(@props.thread, ['archive'], ['inbox'])) # Don't trigger the thread row click event.stopPropagation() module.exports = ThreadListQuickActions