// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import classNames from 'classnames'; import { TypingAnimation } from './TypingAnimation'; import { Avatar } from '../Avatar'; import type { LocalizerType } from '../../types/Util'; import type { ConversationType } from '../../state/ducks/conversations'; export type Props = Pick< ConversationType, | 'acceptedMessageRequest' | 'avatarPath' | 'color' | 'isMe' | 'name' | 'phoneNumber' | 'profileName' | 'sharedGroupNames' | 'title' > & { conversationType: 'group' | 'direct'; i18n: LocalizerType; }; export class TypingBubble extends React.PureComponent { public renderAvatar(): JSX.Element | null { const { acceptedMessageRequest, avatarPath, color, conversationType, i18n, isMe, name, phoneNumber, profileName, sharedGroupNames, title, } = this.props; if (conversationType !== 'group') { return null; } return (
); } public render(): JSX.Element { const { i18n, conversationType } = this.props; const isGroup = conversationType === 'group'; return (
{this.renderAvatar()}
); } }