Quellcode durchsuchen

conference: clear the pending subject after it has been set

master
Saúl Ibarra Corretgé vor 6 Jahren
Ursprung
Commit
871026f4ba

+ 0
- 4
react/features/base/conference/actions.js Datei anzeigen

759
         const { conference } = getState()['features/base/conference'];
759
         const { conference } = getState()['features/base/conference'];
760
 
760
 
761
         if (conference) {
761
         if (conference) {
762
-            dispatch({
763
-                type: SET_PENDING_SUBJECT_CHANGE,
764
-                subject: undefined
765
-            });
766
             conference.setSubject(subject);
762
             conference.setSubject(subject);
767
         } else {
763
         } else {
768
             dispatch({
764
             dispatch({

+ 10
- 2
react/features/base/conference/middleware.js Datei anzeigen

36
     CONFERENCE_WILL_LEAVE,
36
     CONFERENCE_WILL_LEAVE,
37
     DATA_CHANNEL_OPENED,
37
     DATA_CHANNEL_OPENED,
38
     SET_AUDIO_ONLY,
38
     SET_AUDIO_ONLY,
39
-    SET_LASTN
39
+    SET_LASTN,
40
+    SET_PENDING_SUBJECT_CHANGE
40
 } from './actionTypes';
41
 } from './actionTypes';
41
 import {
42
 import {
42
     _addLocalTracksToConference,
43
     _addLocalTracksToConference,
324
  * @private
325
  * @private
325
  * @returns {Object} The value returned by {@code next(action)}.
326
  * @returns {Object} The value returned by {@code next(action)}.
326
  */
327
  */
327
-function _conferenceSubjectChanged({ getState }, next, action) {
328
+function _conferenceSubjectChanged({ dispatch, getState }, next, action) {
328
     const result = next(action);
329
     const result = next(action);
329
     const { subject } = getState()['features/base/conference'];
330
     const { subject } = getState()['features/base/conference'];
330
 
331
 
332
+    if (subject) {
333
+        dispatch({
334
+            type: SET_PENDING_SUBJECT_CHANGE,
335
+            subject: undefined
336
+        });
337
+    }
338
+
331
     typeof APP === 'object' && APP.API.notifySubjectChanged(subject);
339
     typeof APP === 'object' && APP.API.notifySubjectChanged(subject);
332
 
340
 
333
     return result;
341
     return result;

Laden…
Abbrechen
Speichern