fix(salesforce): salesforce only displays focused contact

Summary: re-display information on re-entry of thread

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1340
This commit is contained in:
Evan Morikawa 2015-03-24 17:03:30 -04:00
parent e1ec298d4b
commit 3d75da673b
4 changed files with 5 additions and 6 deletions

View file

@ -8,8 +8,7 @@ SidebarThreadParticipants = React.createClass
displayName: 'SidebarThreadParticipants'
getInitialState: ->
sortedContacts: []
focusedContact: null
@_getStateFromStores()
componentDidMount: ->
@unsubscribe = FocusedContactsStore.listen @_onChange

View file

@ -8,8 +8,7 @@ module.exports =
SidebarFullContact = React.createClass
getInitialState: ->
fullContactCache: {}
focusedContact: null
@_getStateFromStores()
componentDidMount: ->
@unsubscribe = FullContactStore.listen @_onChange

View file

@ -175,7 +175,7 @@ describe "DraftStore", ->
, (thread, message) ->
replyToMessage: fakeMessage1
, (model) ->
expect(model.body.indexOf('On Jan 17 1970, at 1:16 am, Customer <customer@example.com> wrote') > 0).toBe(true)
expect(model.body.search(/On .+, at .+, Customer <customer@example.com> wrote/) > 0).toBe(true)
it "should make the subject the subject of the message, not the thread", ->
fakeMessage1.subject = "OLD SUBJECT"
@ -198,7 +198,7 @@ describe "DraftStore", ->
, (thread, message) ->
replyToMessage: fakeMessage2
, (model) ->
expect(model.body.indexOf('On Jan 17 1970, at 1:16 am, ben@nilas.com wrote:') > 0).toBe(true)
expect(model.body.search(/On .+, at .+, ben@nilas.com wrote:/) > 0).toBe(true)
describe "when a forward message is provided by the attributesCallback", ->
it "should include quoted text in the new message", ->

View file

@ -33,6 +33,7 @@ FocusedContactsStore = Reflux.createStore
_onSelectThreadId: (id) ->
@_currentThreadId = id
@_clearCurrentParticipants()
@_onMessageStoreChanged()
# We need to wait now for the MessageStore to grab all of the
# appropriate messages for the given thread.