diff --git a/internal_packages/message-list/lib/sidebar-thread-participants.cjsx b/internal_packages/message-list/lib/sidebar-thread-participants.cjsx index 182700b20..4811266b3 100644 --- a/internal_packages/message-list/lib/sidebar-thread-participants.cjsx +++ b/internal_packages/message-list/lib/sidebar-thread-participants.cjsx @@ -8,8 +8,7 @@ SidebarThreadParticipants = React.createClass displayName: 'SidebarThreadParticipants' getInitialState: -> - sortedContacts: [] - focusedContact: null + @_getStateFromStores() componentDidMount: -> @unsubscribe = FocusedContactsStore.listen @_onChange diff --git a/internal_packages/sidebar-fullcontact/lib/sidebar-fullcontact.cjsx b/internal_packages/sidebar-fullcontact/lib/sidebar-fullcontact.cjsx index cfcbe0769..c86f1c432 100644 --- a/internal_packages/sidebar-fullcontact/lib/sidebar-fullcontact.cjsx +++ b/internal_packages/sidebar-fullcontact/lib/sidebar-fullcontact.cjsx @@ -8,8 +8,7 @@ module.exports = SidebarFullContact = React.createClass getInitialState: -> - fullContactCache: {} - focusedContact: null + @_getStateFromStores() componentDidMount: -> @unsubscribe = FullContactStore.listen @_onChange diff --git a/spec-inbox/stores/draft-store-spec.coffee b/spec-inbox/stores/draft-store-spec.coffee index cf2b4ccdb..0e8931d67 100644 --- a/spec-inbox/stores/draft-store-spec.coffee +++ b/spec-inbox/stores/draft-store-spec.coffee @@ -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", -> diff --git a/src/flux/stores/focused-contacts-store.coffee b/src/flux/stores/focused-contacts-store.coffee index a2d896ba8..0a5161b03 100644 --- a/src/flux/stores/focused-contacts-store.coffee +++ b/src/flux/stores/focused-contacts-store.coffee @@ -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.