diff --git a/ts/components/conversation/TypingBubble.tsx b/ts/components/conversation/TypingBubble.tsx index f622f0233..0e2ed1fdf 100644 --- a/ts/components/conversation/TypingBubble.tsx +++ b/ts/components/conversation/TypingBubble.tsx @@ -1,16 +1,15 @@ import React from 'react'; import styled from 'styled-components'; -import { TypingAnimation } from './TypingAnimation'; import { ConversationTypeEnum } from '../../models/conversationAttributes'; -import { useSelectedIsGroup } from '../../state/selectors/selectedConversation'; +import { TypingAnimation } from './TypingAnimation'; interface TypingBubbleProps { conversationType: ConversationTypeEnum; isTyping: boolean; } -const TypingBubbleContainer = styled.div` +const TypingBubbleContainer = styled.div>` height: ${props => (props.isTyping ? 'auto' : '0px')}; display: flow-root; padding-bottom: ${props => (props.isTyping ? '4px' : '0px')}; @@ -23,13 +22,13 @@ const TypingBubbleContainer = styled.div` `; export const TypingBubble = (props: TypingBubbleProps) => { - const isOpenOrClosedGroup = useSelectedIsGroup(); - if (!isOpenOrClosedGroup || !props.isTyping) { + const isPrivate = props.conversationType === ConversationTypeEnum.PRIVATE; + if (!isPrivate || !props.isTyping) { return null; } return ( - + );