From 74cd4862321c147cfd52388e2d327d53ccdfb6c0 Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Tue, 8 Nov 2022 17:43:02 +0200 Subject: [PATCH] feat(chat/native): moved ChatAndPollsNavigator to mobile/navigation (#12527) * feat(chat/native): moved ChatAndPollsNavigator to mobile/navigation --- react/features/chat/components/native/index.js | 1 - .../chat/components/ChatAndPollsNavigator.tsx} | 18 ++++++++++++------ .../ConferenceNavigationContainer.tsx | 14 ++++++++------ 3 files changed, 20 insertions(+), 13 deletions(-) rename react/features/{chat/components/native/ChatAndPolls.js => mobile/navigation/components/chat/components/ChatAndPollsNavigator.tsx} (70%) diff --git a/react/features/chat/components/native/index.js b/react/features/chat/components/native/index.js index 1c87ba6a5..0e3e81918 100644 --- a/react/features/chat/components/native/index.js +++ b/react/features/chat/components/native/index.js @@ -1,6 +1,5 @@ // @flow export { default as Chat } from './Chat'; -export { default as ChatAndPolls } from './ChatAndPolls'; export { default as ChatButton } from './ChatButton'; export { default as ChatPrivacyDialog } from './ChatPrivacyDialog'; diff --git a/react/features/chat/components/native/ChatAndPolls.js b/react/features/mobile/navigation/components/chat/components/ChatAndPollsNavigator.tsx similarity index 70% rename from react/features/chat/components/native/ChatAndPolls.js rename to react/features/mobile/navigation/components/chat/components/ChatAndPollsNavigator.tsx index 65ce50aeb..9ef3d50d0 100644 --- a/react/features/chat/components/native/ChatAndPolls.js +++ b/react/features/mobile/navigation/components/chat/components/ChatAndPollsNavigator.tsx @@ -1,17 +1,22 @@ -// @flow +/* eslint-disable lines-around-comment */ import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'; import React from 'react'; import { useSelector } from 'react-redux'; -import { Chat } from '../..'; import { getClientHeight, getClientWidth -} from '../../../base/modal/components/functions.native'; -import { screen } from '../../../mobile/navigation/routes'; -import { chatTabBarOptions } from '../../../mobile/navigation/screenOptions'; -import { PollsPane } from '../../../polls/components'; + // @ts-ignore +} from '../../../../../base/modal/components/functions'; +// @ts-ignore +import { Chat } from '../../../../../chat'; +// @ts-ignore +import { PollsPane } from '../../../../../polls/components'; +// @ts-ignore +import { screen } from '../../../routes'; +// @ts-ignore +import { chatTabBarOptions } from '../../../screenOptions'; const ChatTab = createMaterialTopTabNavigator(); @@ -20,6 +25,7 @@ const ChatAndPolls = () => { const clientWidth = useSelector(getClientWidth); return ( + // @ts-ignore { chatScreenName = screen.conference.chat; chatTitleString = 'chat.title'; } else { - ChatScreen = ChatAndPolls; + ChatScreen = ChatAndPollsNavigator; chatScreenName = screen.conference.chatandpolls.main; chatTitleString = 'chat.titleWithPolls'; }