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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { color } = avatarInitialsAndColor(name);
|
|
||||||
|
|
||||||
if (type === 'd') {
|
if (type === 'd') {
|
||||||
return (
|
return (
|
||||||
<Avatar text={name} baseUrl={baseUrl} size={40} />
|
<Avatar text={name} baseUrl={baseUrl} size={40} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const { color } = avatarInitialsAndColor(name);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[styles.iconContainer, { backgroundColor: color }]}>
|
<View style={[styles.iconContainer, { backgroundColor: color }]}>
|
||||||
|
|
Loading…
Reference in New Issue