Remove unused name on Avatar
This commit is contained in:
parent
0c120eaf3a
commit
ab153b30c8
38 changed files with 4 additions and 77 deletions
|
@ -86,7 +86,6 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
||||||
i18n,
|
i18n,
|
||||||
isMe: false,
|
isMe: false,
|
||||||
loading: Boolean(overrideProps.loading),
|
loading: Boolean(overrideProps.loading),
|
||||||
name: overrideProps.name || '',
|
|
||||||
noteToSelf: Boolean(overrideProps.noteToSelf),
|
noteToSelf: Boolean(overrideProps.noteToSelf),
|
||||||
onClick: action('onClick'),
|
onClick: action('onClick'),
|
||||||
onClickBadge: action('onClickBadge'),
|
onClickBadge: action('onClickBadge'),
|
||||||
|
|
|
@ -56,7 +56,6 @@ export type Props = {
|
||||||
acceptedMessageRequest: boolean;
|
acceptedMessageRequest: boolean;
|
||||||
conversationType: 'group' | 'direct';
|
conversationType: 'group' | 'direct';
|
||||||
isMe: boolean;
|
isMe: boolean;
|
||||||
name?: string;
|
|
||||||
noteToSelf?: boolean;
|
noteToSelf?: boolean;
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
profileName?: string;
|
profileName?: string;
|
||||||
|
@ -302,7 +301,6 @@ export const Avatar: FunctionComponent<Props> = ({
|
||||||
aria-label={i18n('contactAvatarAlt', [title])}
|
aria-label={i18n('contactAvatarAlt', [title])}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'module-Avatar',
|
'module-Avatar',
|
||||||
hasImage ? 'module-Avatar--with-image' : 'module-Avatar--no-image',
|
|
||||||
Boolean(storyRing) && 'module-Avatar--with-story',
|
Boolean(storyRing) && 'module-Avatar--with-story',
|
||||||
storyRing === HasStories.Unread && 'module-Avatar--with-story--unread',
|
storyRing === HasStories.Unread && 'module-Avatar--with-story--unread',
|
||||||
className
|
className
|
||||||
|
|
|
@ -43,7 +43,6 @@ const useProps = (overrideProps: Partial<Props> = {}): Props => ({
|
||||||
hasPendingUpdate: Boolean(overrideProps.hasPendingUpdate),
|
hasPendingUpdate: Boolean(overrideProps.hasPendingUpdate),
|
||||||
i18n,
|
i18n,
|
||||||
isMe: true,
|
isMe: true,
|
||||||
name: text('name', overrideProps.name || ''),
|
|
||||||
noteToSelf: boolean('noteToSelf', overrideProps.noteToSelf || false),
|
noteToSelf: boolean('noteToSelf', overrideProps.noteToSelf || false),
|
||||||
onEditProfile: action('onEditProfile'),
|
onEditProfile: action('onEditProfile'),
|
||||||
onViewArchive: action('onViewArchive'),
|
onViewArchive: action('onViewArchive'),
|
||||||
|
|
|
@ -25,6 +25,7 @@ export type Props = {
|
||||||
// Matches Popper's RefHandler type
|
// Matches Popper's RefHandler type
|
||||||
innerRef?: React.Ref<HTMLDivElement>;
|
innerRef?: React.Ref<HTMLDivElement>;
|
||||||
style: React.CSSProperties;
|
style: React.CSSProperties;
|
||||||
|
name?: string;
|
||||||
} & Omit<AvatarProps, 'onClick'>;
|
} & Omit<AvatarProps, 'onClick'>;
|
||||||
|
|
||||||
export const AvatarPopup = (props: Props): JSX.Element => {
|
export const AvatarPopup = (props: Props): JSX.Element => {
|
||||||
|
|
|
@ -53,7 +53,6 @@ export const CallNeedPermissionScreen: React.FC<Props> = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={conversation.isMe}
|
isMe={conversation.isMe}
|
||||||
name={conversation.name}
|
|
||||||
phoneNumber={conversation.phoneNumber}
|
phoneNumber={conversation.phoneNumber}
|
||||||
profileName={conversation.profileName}
|
profileName={conversation.profileName}
|
||||||
title={conversation.title}
|
title={conversation.title}
|
||||||
|
|
|
@ -352,7 +352,6 @@ export const CallScreen: React.FC<PropsType> = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe
|
isMe
|
||||||
name={me.name}
|
|
||||||
phoneNumber={me.phoneNumber}
|
phoneNumber={me.phoneNumber}
|
||||||
profileName={me.profileName}
|
profileName={me.profileName}
|
||||||
title={me.title}
|
title={me.title}
|
||||||
|
@ -390,7 +389,6 @@ export const CallScreen: React.FC<PropsType> = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe
|
isMe
|
||||||
name={me.name}
|
|
||||||
phoneNumber={me.phoneNumber}
|
phoneNumber={me.phoneNumber}
|
||||||
profileName={me.profileName}
|
profileName={me.profileName}
|
||||||
title={me.title}
|
title={me.title}
|
||||||
|
|
|
@ -39,7 +39,6 @@ const NoVideo = ({
|
||||||
avatarPath,
|
avatarPath,
|
||||||
color,
|
color,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -59,7 +58,6 @@ const NoVideo = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
title={title}
|
title={title}
|
||||||
|
|
|
@ -23,7 +23,6 @@ type PropsType = {
|
||||||
| 'avatarPath'
|
| 'avatarPath'
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -169,7 +168,6 @@ export const CallingPreCallInfo: FunctionComponent<PropsType> = ({
|
||||||
acceptedMessageRequest={conversation.acceptedMessageRequest}
|
acceptedMessageRequest={conversation.acceptedMessageRequest}
|
||||||
conversationType={conversation.type}
|
conversationType={conversation.type}
|
||||||
isMe={conversation.isMe}
|
isMe={conversation.isMe}
|
||||||
name={conversation.name}
|
|
||||||
noteToSelf={false}
|
noteToSelf={false}
|
||||||
phoneNumber={conversation.phoneNumber}
|
phoneNumber={conversation.phoneNumber}
|
||||||
profileName={conversation.profileName}
|
profileName={conversation.profileName}
|
||||||
|
|
|
@ -21,7 +21,6 @@ export type PropsType = {
|
||||||
| 'firstName'
|
| 'firstName'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -37,7 +36,6 @@ export const ContactPill: FunctionComponent<PropsType> = ({
|
||||||
i18n,
|
i18n,
|
||||||
isMe,
|
isMe,
|
||||||
id,
|
id,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -58,7 +56,6 @@ export const ContactPill: FunctionComponent<PropsType> = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
title={title}
|
title={title}
|
||||||
|
|
|
@ -259,7 +259,7 @@ const createConversation = (
|
||||||
id: overrideProps.id || '',
|
id: overrideProps.id || '',
|
||||||
isSelected: boolean('isSelected', overrideProps.isSelected || false),
|
isSelected: boolean('isSelected', overrideProps.isSelected || false),
|
||||||
title: text('title', overrideProps.title || 'Some Person'),
|
title: text('title', overrideProps.title || 'Some Person'),
|
||||||
name: overrideProps.name || 'Some Person',
|
profileName: overrideProps.profileName || 'Some Person',
|
||||||
type: overrideProps.type || 'direct',
|
type: overrideProps.type || 'direct',
|
||||||
markedUnread: boolean('markedUnread', overrideProps.markedUnread || false),
|
markedUnread: boolean('markedUnread', overrideProps.markedUnread || false),
|
||||||
lastMessage: overrideProps.lastMessage || {
|
lastMessage: overrideProps.lastMessage || {
|
||||||
|
@ -313,7 +313,7 @@ export const ConversationWithYourself = (): JSX.Element =>
|
||||||
status: 'read',
|
status: 'read',
|
||||||
deletedForEveryone: false,
|
deletedForEveryone: false,
|
||||||
},
|
},
|
||||||
name: 'Myself',
|
profileName: 'Myself',
|
||||||
title: 'Myself',
|
title: 'Myself',
|
||||||
isMe: true,
|
isMe: true,
|
||||||
});
|
});
|
||||||
|
@ -451,7 +451,6 @@ export const ConversationLongName = (): JSX.Element => {
|
||||||
'Long contact name. Esquire. The third. And stuff. And more! And more!';
|
'Long contact name. Esquire. The third. And stuff. And more! And more!';
|
||||||
|
|
||||||
return renderConversation({
|
return renderConversation({
|
||||||
name,
|
|
||||||
title: name,
|
title: name,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -338,7 +338,6 @@ export const ConversationList: React.FC<PropsType> = ({
|
||||||
'lastUpdated',
|
'lastUpdated',
|
||||||
'markedUnread',
|
'markedUnread',
|
||||||
'muteExpiresAt',
|
'muteExpiresAt',
|
||||||
'name',
|
|
||||||
'phoneNumber',
|
'phoneNumber',
|
||||||
'profileName',
|
'profileName',
|
||||||
'sharedGroupNames',
|
'sharedGroupNames',
|
||||||
|
|
|
@ -47,7 +47,6 @@ function renderAvatar(
|
||||||
avatarPath,
|
avatarPath,
|
||||||
color,
|
color,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -58,7 +57,6 @@ function renderAvatar(
|
||||||
| 'avatarPath'
|
| 'avatarPath'
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -76,7 +74,6 @@ function renderAvatar(
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
title={title}
|
title={title}
|
||||||
|
|
|
@ -173,7 +173,6 @@ export const IncomingCallBar = (props: PropsType): JSX.Element | null => {
|
||||||
avatarPath,
|
avatarPath,
|
||||||
color,
|
color,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -257,7 +256,6 @@ export const IncomingCallBar = (props: PropsType): JSX.Element | null => {
|
||||||
conversationType={conversationType}
|
conversationType={conversationType}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
title={title}
|
title={title}
|
||||||
|
|
|
@ -691,7 +691,6 @@ function LightboxHeader({
|
||||||
conversationType={conversation.type}
|
conversationType={conversation.type}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={conversation.isMe}
|
isMe={conversation.isMe}
|
||||||
name={conversation.name}
|
|
||||||
phoneNumber={conversation.e164}
|
phoneNumber={conversation.e164}
|
||||||
profileName={conversation.profileName}
|
profileName={conversation.profileName}
|
||||||
sharedGroupNames={conversation.sharedGroupNames}
|
sharedGroupNames={conversation.sharedGroupNames}
|
||||||
|
|
|
@ -168,7 +168,6 @@ export class MainHeader extends React.Component<PropsType, StateType> {
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe
|
isMe
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
|
@ -41,7 +41,6 @@ export const MyStoriesButton = ({
|
||||||
avatarPath,
|
avatarPath,
|
||||||
color,
|
color,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
title,
|
title,
|
||||||
|
@ -64,7 +63,6 @@ export const MyStoriesButton = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={Boolean(isMe)}
|
isMe={Boolean(isMe)}
|
||||||
name={name}
|
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
sharedGroupNames={sharedGroupNames}
|
sharedGroupNames={sharedGroupNames}
|
||||||
size={AvatarSize.FORTY_EIGHT}
|
size={AvatarSize.FORTY_EIGHT}
|
||||||
|
@ -106,7 +104,6 @@ export const MyStoriesButton = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={Boolean(isMe)}
|
isMe={Boolean(isMe)}
|
||||||
name={name}
|
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
sharedGroupNames={sharedGroupNames}
|
sharedGroupNames={sharedGroupNames}
|
||||||
size={AvatarSize.FORTY_EIGHT}
|
size={AvatarSize.FORTY_EIGHT}
|
||||||
|
|
|
@ -112,7 +112,6 @@ export const SafetyNumberChangeDialog = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={contact.isMe}
|
isMe={contact.isMe}
|
||||||
name={contact.name}
|
|
||||||
phoneNumber={contact.phoneNumber}
|
phoneNumber={contact.phoneNumber}
|
||||||
profileName={contact.profileName}
|
profileName={contact.profileName}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
|
@ -823,7 +823,6 @@ export const EditDistributionList = ({
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
id={contact.id}
|
id={contact.id}
|
||||||
isMe={contact.isMe}
|
isMe={contact.isMe}
|
||||||
name={contact.name}
|
|
||||||
phoneNumber={contact.phoneNumber}
|
phoneNumber={contact.phoneNumber}
|
||||||
profileName={contact.profileName}
|
profileName={contact.profileName}
|
||||||
sharedGroupNames={contact.sharedGroupNames}
|
sharedGroupNames={contact.sharedGroupNames}
|
||||||
|
|
|
@ -122,7 +122,6 @@ export const StoryDetailsModal = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={contact.isMe}
|
isMe={contact.isMe}
|
||||||
name={contact.profileName}
|
|
||||||
phoneNumber={contact.phoneNumber}
|
phoneNumber={contact.phoneNumber}
|
||||||
profileName={contact.profileName}
|
profileName={contact.profileName}
|
||||||
sharedGroupNames={contact.sharedGroupNames}
|
sharedGroupNames={contact.sharedGroupNames}
|
||||||
|
@ -166,7 +165,6 @@ export const StoryDetailsModal = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={sender.isMe}
|
isMe={sender.isMe}
|
||||||
name={sender.profileName}
|
|
||||||
profileName={sender.profileName}
|
profileName={sender.profileName}
|
||||||
sharedGroupNames={sender.sharedGroupNames}
|
sharedGroupNames={sender.sharedGroupNames}
|
||||||
size={AvatarSize.THIRTY_SIX}
|
size={AvatarSize.THIRTY_SIX}
|
||||||
|
|
|
@ -37,7 +37,6 @@ function StoryListItemAvatar({
|
||||||
getPreferredBadge,
|
getPreferredBadge,
|
||||||
i18n,
|
i18n,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
title,
|
title,
|
||||||
|
@ -46,7 +45,6 @@ function StoryListItemAvatar({
|
||||||
| 'acceptedMessageRequest'
|
| 'acceptedMessageRequest'
|
||||||
| 'avatarPath'
|
| 'avatarPath'
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'name'
|
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
| 'title'
|
| 'title'
|
||||||
|
@ -66,7 +64,6 @@ function StoryListItemAvatar({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={Boolean(isMe)}
|
isMe={Boolean(isMe)}
|
||||||
name={name}
|
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
sharedGroupNames={sharedGroupNames}
|
sharedGroupNames={sharedGroupNames}
|
||||||
size={AvatarSize.FORTY_EIGHT}
|
size={AvatarSize.FORTY_EIGHT}
|
||||||
|
|
|
@ -152,7 +152,6 @@ export const StoryViewer = ({
|
||||||
color,
|
color,
|
||||||
isMe,
|
isMe,
|
||||||
firstName,
|
firstName,
|
||||||
name,
|
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
title,
|
title,
|
||||||
|
@ -614,7 +613,6 @@ export const StoryViewer = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={Boolean(isMe)}
|
isMe={Boolean(isMe)}
|
||||||
name={name}
|
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
sharedGroupNames={sharedGroupNames}
|
sharedGroupNames={sharedGroupNames}
|
||||||
size={AvatarSize.TWENTY_EIGHT}
|
size={AvatarSize.TWENTY_EIGHT}
|
||||||
|
@ -630,7 +628,6 @@ export const StoryViewer = ({
|
||||||
conversationType="group"
|
conversationType="group"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={false}
|
isMe={false}
|
||||||
name={group.name}
|
|
||||||
profileName={group.profileName}
|
profileName={group.profileName}
|
||||||
sharedGroupNames={group.sharedGroupNames}
|
sharedGroupNames={group.sharedGroupNames}
|
||||||
size={AvatarSize.TWENTY_EIGHT}
|
size={AvatarSize.TWENTY_EIGHT}
|
||||||
|
|
|
@ -287,7 +287,6 @@ export const StoryViewsNRepliesModal = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={Boolean(reply.author.isMe)}
|
isMe={Boolean(reply.author.isMe)}
|
||||||
name={reply.author.name}
|
|
||||||
profileName={reply.author.profileName}
|
profileName={reply.author.profileName}
|
||||||
sharedGroupNames={reply.author.sharedGroupNames || []}
|
sharedGroupNames={reply.author.sharedGroupNames || []}
|
||||||
size={AvatarSize.TWENTY_EIGHT}
|
size={AvatarSize.TWENTY_EIGHT}
|
||||||
|
@ -384,7 +383,6 @@ export const StoryViewsNRepliesModal = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={Boolean(view.recipient.isMe)}
|
isMe={Boolean(view.recipient.isMe)}
|
||||||
name={view.recipient.name}
|
|
||||||
profileName={view.recipient.profileName}
|
profileName={view.recipient.profileName}
|
||||||
sharedGroupNames={view.recipient.sharedGroupNames || []}
|
sharedGroupNames={view.recipient.sharedGroupNames || []}
|
||||||
size={AvatarSize.TWENTY_EIGHT}
|
size={AvatarSize.TWENTY_EIGHT}
|
||||||
|
|
|
@ -182,7 +182,6 @@ export const ContactModal = ({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={contact.isMe}
|
isMe={contact.isMe}
|
||||||
name={contact.name}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (conversation && hasStories) {
|
if (conversation && hasStories) {
|
||||||
viewUserStories({
|
viewUserStories({
|
||||||
|
|
|
@ -209,7 +209,6 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
i18n,
|
i18n,
|
||||||
type,
|
type,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -229,7 +228,6 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
conversationType={type}
|
conversationType={type}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
noteToSelf={isMe}
|
noteToSelf={isMe}
|
||||||
onClick={
|
onClick={
|
||||||
hasStories
|
hasStories
|
||||||
|
|
|
@ -102,7 +102,6 @@ DirectNoGroupsJustProfile.story = {
|
||||||
|
|
||||||
export const DirectNoGroupsJustPhoneNumber = Template.bind({});
|
export const DirectNoGroupsJustPhoneNumber = Template.bind({});
|
||||||
DirectNoGroupsJustPhoneNumber.args = {
|
DirectNoGroupsJustPhoneNumber.args = {
|
||||||
name: '',
|
|
||||||
phoneNumber: casual.phone,
|
phoneNumber: casual.phone,
|
||||||
profileName: '',
|
profileName: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -114,7 +113,6 @@ DirectNoGroupsJustPhoneNumber.story = {
|
||||||
export const DirectNoGroupsNoData = Template.bind({});
|
export const DirectNoGroupsNoData = Template.bind({});
|
||||||
DirectNoGroupsNoData.args = {
|
DirectNoGroupsNoData.args = {
|
||||||
avatarPath: undefined,
|
avatarPath: undefined,
|
||||||
name: '',
|
|
||||||
phoneNumber: '',
|
phoneNumber: '',
|
||||||
profileName: '',
|
profileName: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -127,7 +125,6 @@ export const DirectNoGroupsNoDataNotAccepted = Template.bind({});
|
||||||
DirectNoGroupsNoDataNotAccepted.args = {
|
DirectNoGroupsNoDataNotAccepted.args = {
|
||||||
acceptedMessageRequest: false,
|
acceptedMessageRequest: false,
|
||||||
avatarPath: undefined,
|
avatarPath: undefined,
|
||||||
name: '',
|
|
||||||
phoneNumber: '',
|
phoneNumber: '',
|
||||||
profileName: '',
|
profileName: '',
|
||||||
title: '',
|
title: '',
|
||||||
|
@ -187,7 +184,6 @@ export const GroupNoName = Template.bind({});
|
||||||
GroupNoName.args = {
|
GroupNoName.args = {
|
||||||
conversationType: 'group',
|
conversationType: 'group',
|
||||||
membersCount: 0,
|
membersCount: 0,
|
||||||
name: '',
|
|
||||||
title: '',
|
title: '',
|
||||||
};
|
};
|
||||||
GroupNoName.story = {
|
GroupNoName.story = {
|
||||||
|
|
|
@ -26,6 +26,7 @@ export type Props = {
|
||||||
i18n: LocalizerType;
|
i18n: LocalizerType;
|
||||||
isMe: boolean;
|
isMe: boolean;
|
||||||
membersCount?: number;
|
membersCount?: number;
|
||||||
|
name?: string;
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
sharedGroupNames?: Array<string>;
|
sharedGroupNames?: Array<string>;
|
||||||
unblurAvatar: () => void;
|
unblurAvatar: () => void;
|
||||||
|
@ -173,7 +174,6 @@ export const ConversationHero = ({
|
||||||
conversationType={conversationType}
|
conversationType={conversationType}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
noteToSelf={isMe}
|
noteToSelf={isMe}
|
||||||
onClick={avatarOnClick}
|
onClick={avatarOnClick}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
|
|
|
@ -221,7 +221,6 @@ export type PropsData = {
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -1715,7 +1714,6 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={author.isMe}
|
isMe={author.isMe}
|
||||||
name={author.name}
|
|
||||||
onClick={event => {
|
onClick={event => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
@ -34,7 +34,6 @@ export type Contact = Pick<
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -138,7 +137,6 @@ export class MessageDetail extends React.Component<Props> {
|
||||||
badges,
|
badges,
|
||||||
color,
|
color,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -155,7 +153,6 @@ export class MessageDetail extends React.Component<Props> {
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
|
@ -27,7 +27,6 @@ export type Reaction = {
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -234,7 +233,6 @@ export const ReactionViewer = React.forwardRef<HTMLDivElement, Props>(
|
||||||
size={32}
|
size={32}
|
||||||
isMe={from.isMe}
|
isMe={from.isMe}
|
||||||
color={from.color}
|
color={from.color}
|
||||||
name={from.name}
|
|
||||||
profileName={from.profileName}
|
profileName={from.profileName}
|
||||||
phoneNumber={from.phoneNumber}
|
phoneNumber={from.phoneNumber}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
|
@ -478,7 +478,6 @@ const renderContactSpoofingReviewDialog = (
|
||||||
|
|
||||||
const getAbout = () => text('about', '👍 Free to chat');
|
const getAbout = () => text('about', '👍 Free to chat');
|
||||||
const getTitle = () => text('name', 'Cayce Bollard');
|
const getTitle = () => text('name', 'Cayce Bollard');
|
||||||
const getName = () => text('name', 'Cayce Bollard');
|
|
||||||
const getProfileName = () => text('profileName', 'Cayce Bollard (profile)');
|
const getProfileName = () => text('profileName', 'Cayce Bollard (profile)');
|
||||||
const getAvatarPath = () =>
|
const getAvatarPath = () =>
|
||||||
text('avatarPath', '/fixtures/kitten-4-112-112.jpg');
|
text('avatarPath', '/fixtures/kitten-4-112-112.jpg');
|
||||||
|
@ -497,7 +496,6 @@ const renderHeroRow = () => {
|
||||||
id={getDefaultConversation().id}
|
id={getDefaultConversation().id}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={false}
|
isMe={false}
|
||||||
name={getName()}
|
|
||||||
phoneNumber={getPhoneNumber()}
|
phoneNumber={getPhoneNumber()}
|
||||||
profileName={getProfileName()}
|
profileName={getProfileName()}
|
||||||
sharedGroupNames={['NYC Rock Climbers', 'Dinner Party']}
|
sharedGroupNames={['NYC Rock Climbers', 'Dinner Party']}
|
||||||
|
|
|
@ -18,7 +18,6 @@ export type Props = Pick<
|
||||||
| 'avatarPath'
|
| 'avatarPath'
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -38,7 +37,6 @@ export function TypingBubble({
|
||||||
conversationType,
|
conversationType,
|
||||||
i18n,
|
i18n,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
sharedGroupNames,
|
sharedGroupNames,
|
||||||
|
@ -65,7 +63,6 @@ export function TypingBubble({
|
||||||
conversationType="direct"
|
conversationType="direct"
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
|
@ -311,7 +311,6 @@ export const ChooseGroupMembersModal: FunctionComponent<PropsType> = ({
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={contact.isMe}
|
isMe={contact.isMe}
|
||||||
id={contact.id}
|
id={contact.id}
|
||||||
name={contact.name}
|
|
||||||
phoneNumber={contact.phoneNumber}
|
phoneNumber={contact.phoneNumber}
|
||||||
profileName={contact.profileName}
|
profileName={contact.profileName}
|
||||||
sharedGroupNames={contact.sharedGroupNames}
|
sharedGroupNames={contact.sharedGroupNames}
|
||||||
|
|
|
@ -59,7 +59,6 @@ type PropsType = {
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'markedUnread'
|
| 'markedUnread'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -93,7 +92,6 @@ export const BaseConversationListItem: FunctionComponent<PropsType> =
|
||||||
messageStatusIcon,
|
messageStatusIcon,
|
||||||
messageText,
|
messageText,
|
||||||
messageTextIsAlwaysFullSize,
|
messageTextIsAlwaysFullSize,
|
||||||
name,
|
|
||||||
onClick,
|
onClick,
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
|
@ -165,7 +163,6 @@ export const BaseConversationListItem: FunctionComponent<PropsType> =
|
||||||
searchResult={isUsernameSearchResult}
|
searchResult={isUsernameSearchResult}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
name={name}
|
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
title={title}
|
title={title}
|
||||||
|
|
|
@ -32,7 +32,6 @@ export type PropsDataType = {
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -64,7 +63,6 @@ export const ContactCheckbox: FunctionComponent<PropsType> = React.memo(
|
||||||
id,
|
id,
|
||||||
isChecked,
|
isChecked,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
onClick,
|
onClick,
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
|
@ -112,7 +110,6 @@ export const ContactCheckbox: FunctionComponent<PropsType> = React.memo(
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
isSelected={false}
|
isSelected={false}
|
||||||
messageText={messageText}
|
messageText={messageText}
|
||||||
name={name}
|
|
||||||
onClick={onClickItem}
|
onClick={onClickItem}
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
|
|
|
@ -23,7 +23,6 @@ export type ContactListItemConversationType = Pick<
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -56,7 +55,6 @@ export const ContactListItem: FunctionComponent<PropsType> = React.memo(
|
||||||
i18n,
|
i18n,
|
||||||
id,
|
id,
|
||||||
isMe,
|
isMe,
|
||||||
name,
|
|
||||||
onClick,
|
onClick,
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
|
@ -90,7 +88,6 @@ export const ContactListItem: FunctionComponent<PropsType> = React.memo(
|
||||||
isMe={isMe}
|
isMe={isMe}
|
||||||
isSelected={false}
|
isSelected={false}
|
||||||
messageText={messageText}
|
messageText={messageText}
|
||||||
name={name}
|
|
||||||
onClick={onClick ? () => onClick(id) : undefined}
|
onClick={onClick ? () => onClick(id) : undefined}
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
|
|
|
@ -49,7 +49,6 @@ export type PropsData = Pick<
|
||||||
| 'lastUpdated'
|
| 'lastUpdated'
|
||||||
| 'markedUnread'
|
| 'markedUnread'
|
||||||
| 'muteExpiresAt'
|
| 'muteExpiresAt'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -86,7 +85,6 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
|
||||||
lastUpdated,
|
lastUpdated,
|
||||||
markedUnread,
|
markedUnread,
|
||||||
muteExpiresAt,
|
muteExpiresAt,
|
||||||
name,
|
|
||||||
onClick,
|
onClick,
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
profileName,
|
profileName,
|
||||||
|
@ -185,7 +183,6 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
|
||||||
messageStatusIcon={messageStatusIcon}
|
messageStatusIcon={messageStatusIcon}
|
||||||
messageText={messageText}
|
messageText={messageText}
|
||||||
messageTextIsAlwaysFullSize
|
messageTextIsAlwaysFullSize
|
||||||
name={name}
|
|
||||||
onClick={onClickItem}
|
onClick={onClickItem}
|
||||||
phoneNumber={phoneNumber}
|
phoneNumber={phoneNumber}
|
||||||
profileName={profileName}
|
profileName={profileName}
|
||||||
|
|
|
@ -40,7 +40,6 @@ export type PropsDataType = {
|
||||||
| 'badges'
|
| 'badges'
|
||||||
| 'color'
|
| 'color'
|
||||||
| 'isMe'
|
| 'isMe'
|
||||||
| 'name'
|
|
||||||
| 'phoneNumber'
|
| 'phoneNumber'
|
||||||
| 'profileName'
|
| 'profileName'
|
||||||
| 'sharedGroupNames'
|
| 'sharedGroupNames'
|
||||||
|
@ -53,7 +52,6 @@ export type PropsDataType = {
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
title: string;
|
title: string;
|
||||||
isMe?: boolean;
|
isMe?: boolean;
|
||||||
name?: string;
|
|
||||||
profileName?: string;
|
profileName?: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -200,7 +198,6 @@ export const MessageSearchResult: FunctionComponent<PropsType> = React.memo(
|
||||||
isMe={from.isMe}
|
isMe={from.isMe}
|
||||||
isSelected={false}
|
isSelected={false}
|
||||||
messageText={messageText}
|
messageText={messageText}
|
||||||
name={from.name}
|
|
||||||
onClick={onClickItem}
|
onClick={onClickItem}
|
||||||
phoneNumber={from.phoneNumber}
|
phoneNumber={from.phoneNumber}
|
||||||
profileName={from.profileName}
|
profileName={from.profileName}
|
||||||
|
|
|
@ -223,7 +223,6 @@ export class LeftPaneChooseGroupMembersHelper extends LeftPaneHelper<LeftPaneCho
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
id={contact.id}
|
id={contact.id}
|
||||||
isMe={contact.isMe}
|
isMe={contact.isMe}
|
||||||
name={contact.name}
|
|
||||||
phoneNumber={contact.phoneNumber}
|
phoneNumber={contact.phoneNumber}
|
||||||
profileName={contact.profileName}
|
profileName={contact.profileName}
|
||||||
sharedGroupNames={contact.sharedGroupNames}
|
sharedGroupNames={contact.sharedGroupNames}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue