From a23f53286ea486685beb27aa060a286a0909de99 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Sat, 5 Aug 2023 17:52:38 +1000 Subject: [PATCH] fix: typing bubble relates to current conversation, not selected one --- ts/components/conversation/TypingBubble.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 ( - + );