Conversations: Change the way otherAccounts is handled

Fixes #191
This commit is contained in:
Alex Gleason 2020-06-12 22:04:20 -05:00
parent 3179eacadd
commit b4532ccb40
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 3 additions and 9 deletions

View file

@ -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 = (
<>
<bdi><strong className='display-name__html' dangerouslySetInnerHTML={{ __html: account.get('display_name_html') }} /></bdi>

View file

@ -386,7 +386,7 @@ class Status extends ImmutablePureComponent {
);
}
if (otherAccounts && otherAccounts.size > 0) {
if (otherAccounts && otherAccounts.size > 1) {
statusAvatar = <AvatarComposite accounts={otherAccounts} size={48} />;
} else if (account === undefined || account === null) {
statusAvatar = <Avatar account={status.get('account')} size={48} />;