mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-23 16:56:08 +08:00
4619871e8d
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
37 lines
1,001 B
CoffeeScript
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
|