fix(rn,chat): Fix chat and polls title

This commit is contained in:
Vlad Piersec 2021-12-06 10:45:42 +02:00 committed by Saúl Ibarra Corretgé
parent 0fb29a0c7a
commit bfc0567e32
1 changed files with 14 additions and 9 deletions

View File

@ -38,14 +38,19 @@ const ConferenceStack = createStackNavigator();
const ConferenceNavigationContainer = () => {
const isPollsDisabled = useSelector(getDisablePolls);
const ChatScreen
= isPollsDisabled
? Chat
: ChatAndPolls;
const chatScreenName
= isPollsDisabled
? screen.conference.chat
: screen.conference.chatandpolls.main;
let ChatScreen;
let chatScreenName;
let chatTitleString;
if (isPollsDisabled) {
ChatScreen = Chat;
chatScreenName = screen.conference.chat;
chatTitleString = 'chat.title';
} else {
ChatScreen = ChatAndPolls;
chatScreenName = screen.conference.chatandpolls.main;
chatTitleString = 'chat.titleWithPolls';
}
const { t } = useTranslation();
return (
@ -66,7 +71,7 @@ const ConferenceNavigationContainer = () => {
name = { chatScreenName }
options = {{
...chatScreenOptions,
title: t('chat.title')
title: t(chatTitleString)
}} />
<ConferenceStack.Screen
component = { ParticipantsPane }