conference: clear the pending subject after it has been set

This commit is contained in:
Saúl Ibarra Corretgé 2019-05-29 12:44:35 +02:00 committed by Saúl Ibarra Corretgé
parent 9a8a070c62
commit 871026f4ba
2 changed files with 10 additions and 6 deletions

View File

@ -759,10 +759,6 @@ export function setSubject(subject: string = '') {
const { conference } = getState()['features/base/conference']; const { conference } = getState()['features/base/conference'];
if (conference) { if (conference) {
dispatch({
type: SET_PENDING_SUBJECT_CHANGE,
subject: undefined
});
conference.setSubject(subject); conference.setSubject(subject);
} else { } else {
dispatch({ dispatch({

View File

@ -36,7 +36,8 @@ import {
CONFERENCE_WILL_LEAVE, CONFERENCE_WILL_LEAVE,
DATA_CHANNEL_OPENED, DATA_CHANNEL_OPENED,
SET_AUDIO_ONLY, SET_AUDIO_ONLY,
SET_LASTN SET_LASTN,
SET_PENDING_SUBJECT_CHANGE
} from './actionTypes'; } from './actionTypes';
import { import {
_addLocalTracksToConference, _addLocalTracksToConference,
@ -324,10 +325,17 @@ function _connectionFailed({ dispatch, getState }, next, action) {
* @private * @private
* @returns {Object} The value returned by {@code next(action)}. * @returns {Object} The value returned by {@code next(action)}.
*/ */
function _conferenceSubjectChanged({ getState }, next, action) { function _conferenceSubjectChanged({ dispatch, getState }, next, action) {
const result = next(action); const result = next(action);
const { subject } = getState()['features/base/conference']; const { subject } = getState()['features/base/conference'];
if (subject) {
dispatch({
type: SET_PENDING_SUBJECT_CHANGE,
subject: undefined
});
}
typeof APP === 'object' && APP.API.notifySubjectChanged(subject); typeof APP === 'object' && APP.API.notifySubjectChanged(subject);
return result; return result;