Add badges to all conversation lists

This commit is contained in:
Evan Hahn 2021-11-17 15:11:21 -06:00 committed by GitHub
parent 2c4dfc74c4
commit 2cbcd59609
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 131 additions and 83 deletions

View file

@ -29,7 +29,6 @@ export const MESSAGE_TEXT_CLASS_NAME = `${MESSAGE_CLASS_NAME}__text`;
const CHECKBOX_CLASS_NAME = `${BASE_CLASS_NAME}__checkbox`;
type PropsType = {
badge?: BadgeType;
checked?: boolean;
conversationType: 'group' | 'direct';
disabled?: boolean;
@ -47,7 +46,6 @@ type PropsType = {
messageTextIsAlwaysFullSize?: boolean;
onClick?: () => void;
shouldShowSpinner?: boolean;
theme?: ThemeType;
unreadCount?: number;
} & Pick<
ConversationType,
@ -62,7 +60,11 @@ type PropsType = {
| 'sharedGroupNames'
| 'title'
| 'unblurredAvatarPath'
>;
> &
(
| { badge?: undefined; theme?: ThemeType }
| { badge: BadgeType; theme: ThemeType }
);
export const BaseConversationListItem: FunctionComponent<PropsType> =
React.memo(function BaseConversationListItem({