diff --git a/react/features/chat/components/native/Chat.js b/react/features/chat/components/native/Chat.js index ef7d71a07..c3b2affd1 100644 --- a/react/features/chat/components/native/Chat.js +++ b/react/features/chat/components/native/Chat.js @@ -6,6 +6,7 @@ import React, { useEffect } from 'react'; import { translate } from '../../../base/i18n'; import JitsiScreen from '../../../base/modal/components/JitsiScreen'; import { connect } from '../../../base/redux'; +import { closeChat } from '../../actions.any'; import AbstractChat, { _mapStateToProps, type Props as AbstractProps @@ -81,6 +82,8 @@ export default translate(connect(_mapStateToProps)(props => { navigation.setOptions({ tabBarLabel: `${t('chat.tabs.chat')} ${nrUnreadMessages}` }); + + return () => props.dispatch(closeChat()); }, [ nrUnreadMessages ]); return ( diff --git a/react/features/chat/components/native/PrivateMessageButton.js b/react/features/chat/components/native/PrivateMessageButton.js index b639fbf26..49166b8ab 100644 --- a/react/features/chat/components/native/PrivateMessageButton.js +++ b/react/features/chat/components/native/PrivateMessageButton.js @@ -6,10 +6,11 @@ import { IconMessage, IconReply } from '../../../base/icons'; import { getParticipantById } from '../../../base/participants'; import { connect } from '../../../base/redux'; import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components'; -import { handleLobbyChatInitialized } from '../../../chat/actions.any'; +import { handleLobbyChatInitialized, openChat } from '../../../chat/actions'; import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; + export type Props = AbstractButtonProps & { /** @@ -68,6 +69,8 @@ class PrivateMessageButton extends AbstractButton { this.props.dispatch(handleLobbyChatInitialized(this.props.participantID)); } + this.props.dispatch(openChat(this.props._participant)); + this.props._isPollsDisabled ? navigate(screen.conference.chat, { privateMessageRecipient: this.props._participant