rn: show conference subject if set

This commit is contained in:
Saúl Ibarra Corretgé 2019-05-29 09:53:12 +02:00 committed by Saúl Ibarra Corretgé
parent 7cf4c7bd78
commit 9a8a070c62
3 changed files with 8 additions and 5 deletions

View File

@ -84,6 +84,8 @@ function _addConferenceListeners(conference, dispatch) {
conference.on(
JitsiConferenceEvents.CONFERENCE_LEFT,
(...args) => dispatch(conferenceLeft(conference, ...args)));
conference.on(JitsiConferenceEvents.SUBJECT_CHANGED,
(...args) => dispatch(conferenceSubjectChanged(...args)));
conference.on(
JitsiConferenceEvents.KICKED,

View File

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

View File

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