Mailspring/internal_packages/message-list/lib/message-toolbar-items.cjsx
Evan Morikawa 4619871e8d refactor(utils): switch to regular underscore
Summary:
Fixes: T1334

remove final InboxApp references

move out all underscore-plus methods

Mass find and replace of underscore-plus

sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee
sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1534
2015-05-19 16:06:59 -07:00

37 lines
1,001 B
CoffeeScript

_ = require 'underscore'
React = require 'react'
classNames = require 'classnames'
{Actions, Utils, FocusedContentStore, WorkspaceStore} = require 'nylas-exports'
{RetinaImg, Popover, Menu} = require 'nylas-component-kit'
ThreadArchiveButton = require './thread-archive-button'
class MessageToolbarItems extends React.Component
@displayName: "MessageToolbarItems"
constructor: (@props) ->
@state =
threadIsSelected: FocusedContentStore.focusedId('thread')?
render: =>
classes = classNames
"message-toolbar-items": true
"hidden": !@state.threadIsSelected
<div className={classes}>
<ThreadArchiveButton />
</div>
componentDidMount: =>
@_unsubscribers = []
@_unsubscribers.push FocusedContentStore.listen @_onChange
componentWillUnmount: =>
unsubscribe() for unsubscribe in @_unsubscribers
_onChange: => _.defer =>
@setState
threadIsSelected: FocusedContentStore.focusedId('thread')?
module.exports = MessageToolbarItems