From b4532ccb4096ef3983847c7ea02ce6a221d35291 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 12 Jun 2020 22:04:20 -0500 Subject: [PATCH] Conversations: Change the way otherAccounts is handled Fixes #191 --- app/soapbox/components/display_name.js | 10 ++-------- app/soapbox/components/status.js | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/soapbox/components/display_name.js b/app/soapbox/components/display_name.js index a376dc761..1016c9f5a 100644 --- a/app/soapbox/components/display_name.js +++ b/app/soapbox/components/display_name.js @@ -11,9 +11,9 @@ export default class DisplayName extends React.PureComponent { }; render() { - const { others } = this.props; + const { account, others } = this.props; - let displayName, suffix, account; + let displayName, suffix; if (others && others.size > 1) { displayName = others.take(2).map(a => [ @@ -27,12 +27,6 @@ export default class DisplayName extends React.PureComponent { suffix = `+${others.size - 2}`; } } else { - if (others && others.size > 0) { - account = others.first(); - } else { - account = this.props.account; - } - displayName = ( <> diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index 848082da6..bc0dc1cbc 100644 --- a/app/soapbox/components/status.js +++ b/app/soapbox/components/status.js @@ -386,7 +386,7 @@ class Status extends ImmutablePureComponent { ); } - if (otherAccounts && otherAccounts.size > 0) { + if (otherAccounts && otherAccounts.size > 1) { statusAvatar = ; } else if (account === undefined || account === null) { statusAvatar = ;