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:
parent
8eed6b62b9
commit
66aa6f142a
1 changed files with 3 additions and 1 deletions
|
@ -5,13 +5,14 @@ import { ContactName } from './ContactName';
|
||||||
import { Avatar, Props as AvatarProps } from '../Avatar';
|
import { Avatar, Props as AvatarProps } from '../Avatar';
|
||||||
import { Emoji } from '../emoji/Emoji';
|
import { Emoji } from '../emoji/Emoji';
|
||||||
import { useRestoreFocus } from '../../util/hooks';
|
import { useRestoreFocus } from '../../util/hooks';
|
||||||
|
import { ColorType } from '../../types/Util';
|
||||||
|
|
||||||
export type Reaction = {
|
export type Reaction = {
|
||||||
emoji: string;
|
emoji: string;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
from: {
|
from: {
|
||||||
id: string;
|
id: string;
|
||||||
color?: string;
|
color?: ColorType;
|
||||||
avatarPath?: string;
|
avatarPath?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
profileName?: string;
|
profileName?: string;
|
||||||
|
@ -151,6 +152,7 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
|
||||||
avatarPath={from.avatarPath}
|
avatarPath={from.avatarPath}
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
size={32}
|
size={32}
|
||||||
|
color={from.color}
|
||||||
name={from.name}
|
name={from.name}
|
||||||
profileName={from.profileName}
|
profileName={from.profileName}
|
||||||
phoneNumber={from.phoneNumber}
|
phoneNumber={from.phoneNumber}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue