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
47 lines
1.3 KiB
CoffeeScript
47 lines
1.3 KiB
CoffeeScript
_ = require 'underscore'
|
|
React = require "react"
|
|
FullContactStore = require "./fullcontact-store"
|
|
|
|
{InjectedComponentSet} = require 'nylas-component-kit'
|
|
|
|
SidebarFullContactDetails = require "./sidebar-fullcontact-details"
|
|
|
|
class SidebarFullContact extends React.Component
|
|
@displayName: "SidebarFullContact"
|
|
@containerStyles:
|
|
order: 1
|
|
maxWidth: 300
|
|
minWidth: 200
|
|
flexShrink: 0
|
|
|
|
constructor: (@props) ->
|
|
@state = @_getStateFromStores()
|
|
|
|
componentDidMount: =>
|
|
@unsubscribe = FullContactStore.listen @_onChange
|
|
|
|
componentWillUnmount: =>
|
|
@unsubscribe()
|
|
|
|
render: =>
|
|
<div className="full-contact-sidebar">
|
|
<SidebarFullContactDetails contact={@state.focusedContact ? {}}
|
|
fullContact={@_fullContact()}/>
|
|
<InjectedComponentSet matching={role: "sidebar:focusedContactInfo"}
|
|
exposedProps={focusedContact: @state.focusedContact}/>
|
|
</div>
|
|
|
|
_fullContact: =>
|
|
if @state.focusedContact?.thirdPartyData
|
|
return @state.focusedContact?.thirdPartyData["FullContact"] ? {}
|
|
else
|
|
return {}
|
|
|
|
_onChange: =>
|
|
@setState(@_getStateFromStores())
|
|
|
|
_getStateFromStores: =>
|
|
focusedContact: FullContactStore.focusedContact()
|
|
|
|
|
|
module.exports = SidebarFullContact
|