Browse Source

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

master
Vlad Piersec 3 years ago
parent
commit
bfc0567e32

+ 14
- 9
react/features/conference/components/native/ConferenceNavigationContainer.js View File

@@ -38,14 +38,19 @@ const ConferenceStack = createStackNavigator();
38 38
 
39 39
 const ConferenceNavigationContainer = () => {
40 40
     const isPollsDisabled = useSelector(getDisablePolls);
41
-    const ChatScreen
42
-        = isPollsDisabled
43
-            ? Chat
44
-            : ChatAndPolls;
45
-    const chatScreenName
46
-        = isPollsDisabled
47
-            ? screen.conference.chat
48
-            : screen.conference.chatandpolls.main;
41
+    let ChatScreen;
42
+    let chatScreenName;
43
+    let chatTitleString;
44
+
45
+    if (isPollsDisabled) {
46
+        ChatScreen = Chat;
47
+        chatScreenName = screen.conference.chat;
48
+        chatTitleString = 'chat.title';
49
+    } else {
50
+        ChatScreen = ChatAndPolls;
51
+        chatScreenName = screen.conference.chatandpolls.main;
52
+        chatTitleString = 'chat.titleWithPolls';
53
+    }
49 54
     const { t } = useTranslation();
50 55
 
51 56
     return (
@@ -66,7 +71,7 @@ const ConferenceNavigationContainer = () => {
66 71
                         name = { chatScreenName }
67 72
                         options = {{
68 73
                             ...chatScreenOptions,
69
-                            title: t('chat.title')
74
+                            title: t(chatTitleString)
70 75
                         }} />
71 76
                     <ConferenceStack.Screen
72 77
                         component = { ParticipantsPane }

Loading…
Cancel
Save