Avatar color on ReactionViewer is now Contact Color, not Grey (#4325)

Fixes #4167. A user's avatar, if they do not have a profile picure,
now shows up with their assigned color rather than as grey in the
reactionviewer.

Changed the ReactionViewer from field to make the
color a ColorType rather than a string, and passed that to the color prop
of the Avatar rendered in the viewer.
This commit is contained in:
Nat Talbot 2020-06-10 17:48:26 -04:00 committed by GitHub
parent 8eed6b62b9
commit 66aa6f142a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,13 +5,14 @@ import { ContactName } from './ContactName';
import { Avatar, Props as AvatarProps } from '../Avatar';
import { Emoji } from '../emoji/Emoji';
import { useRestoreFocus } from '../../util/hooks';
import { ColorType } from '../../types/Util';
export type Reaction = {
emoji: string;
timestamp: number;
from: {
id: string;
color?: string;
color?: ColorType;
avatarPath?: string;
name?: string;
profileName?: string;
@ -151,6 +152,7 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
avatarPath={from.avatarPath}
conversationType="direct"
size={32}
color={from.color}
name={from.name}
profileName={from.profileName}
phoneNumber={from.phoneNumber}