avoid recalc colors and initials avatar

This commit is contained in:
Guilherme Gazzo 2017-11-19 01:42:35 -02:00
parent bb5978444c
commit 441016330b
1 changed files with 1 additions and 2 deletions

View File

@ -87,13 +87,12 @@ export default class RoomItem extends React.PureComponent {
return null;
}
const { color } = avatarInitialsAndColor(name);
if (type === 'd') {
return (
<Avatar text={name} baseUrl={baseUrl} size={40} />
);
}
const { color } = avatarInitialsAndColor(name);
return (
<View style={[styles.iconContainer, { backgroundColor: color }]}>