mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
57cb02c76a
Summary: #### WIP! #### This is making it all work with the association endpoint, putting together the Salesforce Sidebar interfaces, and getting the nested creators/updaters working. I still need to do a bunch of UI work and actually debug the whole workflow still --- rename SalesforceContactStore to SalesforceSearchStore rename SalesforceContact to SalesforceSearchResult salesforce sidebar changes salesforce association picker object form store fixes figuring out newFormItem instigators Make SalesforceObjectFormStore declarative off SalesforceObjectStore Make action basd handlers for SalesforceObjectStore sidebar store create and associate salesforce sidebar and picker fixes association works and displays on sidebar salesforce object form fixes object form fixes fix salesforce updating Test Plan: TODO Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://review.inboxapp.com/D1440
26 lines
674 B
CoffeeScript
26 lines
674 B
CoffeeScript
_ = require 'underscore-plus'
|
|
React = require 'react'
|
|
{FocusedContentStore} = require 'inbox-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
|