[FIX] Avatar shown when useRealName is activated (#1162)

* Fix avatar when use real name

* Wrong indentation
This commit is contained in:
Djorkaeff Alexandre 2019-09-26 15:35:33 -03:00 committed by Diego Mello
parent fdc5114a30
commit 22899f316c
2 changed files with 6 additions and 4 deletions

View File

@ -63,8 +63,9 @@ class RoomItem extends React.Component {
status: PropTypes.string, status: PropTypes.string,
toggleFav: PropTypes.func, toggleFav: PropTypes.func,
toggleRead: PropTypes.func, toggleRead: PropTypes.func,
hideChannel: PropTypes.func hideChannel: PropTypes.func,
}; avatar: PropTypes.bool
}
static defaultProps = { static defaultProps = {
avatarSize: 48 avatarSize: 48
@ -217,7 +218,7 @@ class RoomItem extends React.Component {
render() { render() {
const { const {
unread, userMentions, name, _updatedAt, alert, testID, type, avatarSize, baseUrl, userId, username, token, id, prid, showLastMessage, lastMessage, isRead, width, favorite, status unread, userMentions, name, _updatedAt, alert, testID, type, avatarSize, baseUrl, userId, username, token, id, prid, showLastMessage, lastMessage, isRead, width, favorite, status, avatar
} = this.props; } = this.props;
const date = formatDate(_updatedAt); const date = formatDate(_updatedAt);
@ -274,7 +275,7 @@ class RoomItem extends React.Component {
accessibilityLabel={accessibilityLabel} accessibilityLabel={accessibilityLabel}
> >
<Avatar <Avatar
text={name} text={avatar}
size={avatarSize} size={avatarSize}
type={type} type={type}
baseUrl={baseUrl} baseUrl={baseUrl}

View File

@ -603,6 +603,7 @@ class RoomsListView extends React.Component {
userMentions={item.userMentions} userMentions={item.userMentions}
isRead={this.getIsRead(item)} isRead={this.getIsRead(item)}
favorite={item.f} favorite={item.f}
avatar={item.name}
lastMessage={item.lastMessage} lastMessage={item.lastMessage}
name={this.getRoomTitle(item)} name={this.getRoomTitle(item)}
_updatedAt={item.roomUpdatedAt} _updatedAt={item.roomUpdatedAt}