Conversations: Change the way otherAccounts is handled

Fixes #191
stable/1.0.x
Alex Gleason 2020-06-12 22:04:20 -05:00
rodzic 3179eacadd
commit b4532ccb40
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 3 dodań i 9 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -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} />;