Mailspring/internal_packages/message-list/lib/message-subject-item.cjsx
Evan Morikawa 57cb02c76a feat(salesforce): associate threads with SF objects
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
2015-04-30 11:35:38 -07:00

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