mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 12:40: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
26 lines
669 B
CoffeeScript
26 lines
669 B
CoffeeScript
_ = require 'underscore'
|
|
React = require 'react'
|
|
{FocusedContentStore} = require 'nylas-exports'
|
|
|
|
class MessageSubjectItem extends React.Component
|
|
@displayName: 'MessageSubjectItem'
|
|
|
|
constructor: (@props) ->
|
|
@state = @_getStateFromStores()
|
|
|
|
componentDidMount: =>
|
|
@_unsubscriber = FocusedContentStore.listen @_onChange
|
|
|
|
componentWillUnmount: =>
|
|
@_unsubscriber() if @_unsubscriber
|
|
|
|
render: =>
|
|
<div className="message-toolbar-subject">{@state.thread?.subject}</div>
|
|
|
|
_onChange: => _.defer =>
|
|
@setState(@_getStateFromStores())
|
|
|
|
_getStateFromStores: =>
|
|
thread: FocusedContentStore.focused('thread')
|
|
|
|
module.exports = MessageSubjectItem
|