rn: show conference subject if set
This commit is contained in:
parent
7cf4c7bd78
commit
9a8a070c62
|
@ -84,6 +84,8 @@ function _addConferenceListeners(conference, dispatch) {
|
||||||
conference.on(
|
conference.on(
|
||||||
JitsiConferenceEvents.CONFERENCE_LEFT,
|
JitsiConferenceEvents.CONFERENCE_LEFT,
|
||||||
(...args) => dispatch(conferenceLeft(conference, ...args)));
|
(...args) => dispatch(conferenceLeft(conference, ...args)));
|
||||||
|
conference.on(JitsiConferenceEvents.SUBJECT_CHANGED,
|
||||||
|
(...args) => dispatch(conferenceSubjectChanged(...args)));
|
||||||
|
|
||||||
conference.on(
|
conference.on(
|
||||||
JitsiConferenceEvents.KICKED,
|
JitsiConferenceEvents.KICKED,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { JitsiTrackErrors } from '../lib-jitsi-meet';
|
import { JitsiTrackErrors } from '../lib-jitsi-meet';
|
||||||
import {
|
import {
|
||||||
getLocalParticipant,
|
getLocalParticipant,
|
||||||
|
@ -155,10 +157,10 @@ export function forEachConference(
|
||||||
export function getConferenceName(stateful: Function | Object): string {
|
export function getConferenceName(stateful: Function | Object): string {
|
||||||
const state = toState(stateful);
|
const state = toState(stateful);
|
||||||
const { callee } = state['features/base/jwt'];
|
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
|
return pendingSubjectChange || subject || callDisplayName || (callee && callee.name) || _.startCase(room);
|
||||||
|| (callee && callee.name)
|
|
||||||
|| state['features/base/conference'].room;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import _ from 'lodash';
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { SafeAreaView, Text, View } from 'react-native';
|
import { SafeAreaView, Text, View } from 'react-native';
|
||||||
import LinearGradient from 'react-native-linear-gradient';
|
import LinearGradient from 'react-native-linear-gradient';
|
||||||
|
@ -82,7 +81,7 @@ class NavigationBar extends Component<Props> {
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
return {
|
return {
|
||||||
_meetingName: _.startCase(getConferenceName(state)),
|
_meetingName: getConferenceName(state),
|
||||||
_visible: isToolboxVisible(state)
|
_visible: isToolboxVisible(state)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue