mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-06 03:14:39 +08:00
fix(sidebar): don't show nulled profiles
This commit is contained in:
parent
716533b9f1
commit
8f94012dd7
2 changed files with 4 additions and 4 deletions
|
@ -45,15 +45,15 @@ module.exports = class ClearbitDataSource
|
||||||
|
|
||||||
_socialProfiles: (person={}) ->
|
_socialProfiles: (person={}) ->
|
||||||
profiles = {}
|
profiles = {}
|
||||||
if person.twitter
|
if (person.twitter?.handle ? "").length > 0
|
||||||
profiles.twitter =
|
profiles.twitter =
|
||||||
handle: person.twitter.handle
|
handle: person.twitter.handle
|
||||||
url: "https://twitter.com/#{person.twitter.handle}"
|
url: "https://twitter.com/#{person.twitter.handle}"
|
||||||
if person.facebook
|
if (person.facebook?.handle ? "").length > 0
|
||||||
profiles.facebook =
|
profiles.facebook =
|
||||||
handle: person.facebook.handle
|
handle: person.facebook.handle
|
||||||
url: "https://facebook.com/#{person.facebook.handle}"
|
url: "https://facebook.com/#{person.facebook.handle}"
|
||||||
if person.linkedin
|
if (person.linkedin?.handle ? "").length > 0
|
||||||
profiles.linkedin =
|
profiles.linkedin =
|
||||||
handle: person.linkedin.handle
|
handle: person.linkedin.handle
|
||||||
url: "https://linkedin.com/#{person.linkedin.handle}"
|
url: "https://linkedin.com/#{person.linkedin.handle}"
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default class SidebarParticipantProfile extends React.Component {
|
||||||
const profiles = _.map(this.state.socialProfiles, (profile, type) => {
|
const profiles = _.map(this.state.socialProfiles, (profile, type) => {
|
||||||
const linkFn = () => {shell.openExternal(profile.url)}
|
const linkFn = () => {shell.openExternal(profile.url)}
|
||||||
return (
|
return (
|
||||||
<a className="social-profile-item" onClick={linkFn} key={type}>
|
<a className="social-profile-item" onClick={linkFn} key={type} title={profile.url}>
|
||||||
<RetinaImg url={`nylas://participant-profile/assets/${type}-sidebar-icon@2x.png`}
|
<RetinaImg url={`nylas://participant-profile/assets/${type}-sidebar-icon@2x.png`}
|
||||||
mode={RetinaImg.Mode.ContentPreserve} />
|
mode={RetinaImg.Mode.ContentPreserve} />
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue