浏览代码

rn: show conference subject if set

master
Saúl Ibarra Corretgé 6 年前
父节点
当前提交
9a8a070c62

+ 2
- 0
react/features/base/conference/actions.js 查看文件

@@ -84,6 +84,8 @@ function _addConferenceListeners(conference, dispatch) {
84 84
     conference.on(
85 85
         JitsiConferenceEvents.CONFERENCE_LEFT,
86 86
         (...args) => dispatch(conferenceLeft(conference, ...args)));
87
+    conference.on(JitsiConferenceEvents.SUBJECT_CHANGED,
88
+        (...args) => dispatch(conferenceSubjectChanged(...args)));
87 89
 
88 90
     conference.on(
89 91
         JitsiConferenceEvents.KICKED,

+ 5
- 3
react/features/base/conference/functions.js 查看文件

@@ -1,5 +1,7 @@
1 1
 // @flow
2 2
 
3
+import _ from 'lodash';
4
+
3 5
 import { JitsiTrackErrors } from '../lib-jitsi-meet';
4 6
 import {
5 7
     getLocalParticipant,
@@ -155,10 +157,10 @@ export function forEachConference(
155 157
 export function getConferenceName(stateful: Function | Object): string {
156 158
     const state = toState(stateful);
157 159
     const { callee } = state['features/base/jwt'];
160
+    const { callDisplayName } = state['features/base/config'];
161
+    const { pendingSubjectChange, room, subject } = state['features/base/conference'];
158 162
 
159
-    return state['features/base/config'].callDisplayName
160
-                || (callee && callee.name)
161
-                || state['features/base/conference'].room;
163
+    return pendingSubjectChange || subject || callDisplayName || (callee && callee.name) || _.startCase(room);
162 164
 }
163 165
 
164 166
 /**

+ 1
- 2
react/features/conference/components/native/NavigationBar.js 查看文件

@@ -1,6 +1,5 @@
1 1
 // @flow
2 2
 
3
-import _ from 'lodash';
4 3
 import React, { Component } from 'react';
5 4
 import { SafeAreaView, Text, View } from 'react-native';
6 5
 import LinearGradient from 'react-native-linear-gradient';
@@ -82,7 +81,7 @@ class NavigationBar extends Component<Props> {
82 81
  */
83 82
 function _mapStateToProps(state) {
84 83
     return {
85
-        _meetingName: _.startCase(getConferenceName(state)),
84
+        _meetingName: getConferenceName(state),
86 85
         _visible: isToolboxVisible(state)
87 86
     };
88 87
 }

正在加载...
取消
保存