avoid recalc colors and initials avatar
This commit is contained in:
parent
bb5978444c
commit
441016330b
|
@ -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 }]}>
|
||||
|
|
Loading…
Reference in New Issue