mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
aad21317e5
Summary: There are two known issues: - toolbar is not draggable in some areas when in three-pane mode. - archive button appears over very long subjects. Propose moving this button elsewhere. WIP WIP Test Plan: Run tests Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1311
25 lines
564 B
CoffeeScript
25 lines
564 B
CoffeeScript
React = require 'react'
|
|
{ThreadStore} = require 'inbox-exports'
|
|
|
|
module.exports =
|
|
MessageSubjectItem = React.createClass
|
|
displayName: 'MessageSubjectItem'
|
|
|
|
getInitialState: ->
|
|
@_getStateFromStores()
|
|
|
|
componentDidMount: ->
|
|
@_unsubscriber = ThreadStore.listen @_onChange
|
|
|
|
componentWillUnmount: ->
|
|
@_unsubscriber() if @_unsubscriber
|
|
|
|
render: ->
|
|
<div className="message-toolbar-subject">{@state.thread?.subject}</div>
|
|
|
|
_onChange: ->
|
|
@setState(@_getStateFromStores())
|
|
|
|
_getStateFromStores: ->
|
|
thread: ThreadStore.selectedThread()
|
|
|