Pārlūkot izejas kodu

audio-mode: don't change the mode unless there is no active conference

If a new conference is joined and as a result the current one is terminated,
don't ever attempt to set the audio mode.
master
Saúl Ibarra Corretgé 6 gadus atpakaļ
vecāks
revīzija
7289e59ca9
1 mainītis faili ar 10 papildinājumiem un 3 dzēšanām
  1. 10
    3
      react/features/mobile/audio-mode/middleware.js

+ 10
- 3
react/features/mobile/audio-mode/middleware.js Parādīt failu

7
     CONFERENCE_FAILED,
7
     CONFERENCE_FAILED,
8
     CONFERENCE_LEFT,
8
     CONFERENCE_LEFT,
9
     CONFERENCE_JOINED,
9
     CONFERENCE_JOINED,
10
-    SET_AUDIO_ONLY
10
+    SET_AUDIO_ONLY,
11
+    getCurrentConference
11
 } from '../../base/conference';
12
 } from '../../base/conference';
12
 import { MiddlewareRegistry } from '../../base/redux';
13
 import { MiddlewareRegistry } from '../../base/redux';
13
 
14
 
31
         switch (action.type) {
32
         switch (action.type) {
32
         case APP_WILL_MOUNT:
33
         case APP_WILL_MOUNT:
33
         case CONFERENCE_FAILED:
34
         case CONFERENCE_FAILED:
34
-        case CONFERENCE_LEFT:
35
-            mode = AudioMode.DEFAULT;
35
+        case CONFERENCE_LEFT: {
36
+            const conference = getCurrentConference(getState());
37
+
38
+            if (typeof conference === 'undefined') {
39
+                mode = AudioMode.DEFAULT;
40
+            }
41
+
36
             break;
42
             break;
43
+        }
37
 
44
 
38
         /*
45
         /*
39
          * NOTE: We moved the audio mode setting from CONFERENCE_WILL_JOIN to
46
          * NOTE: We moved the audio mode setting from CONFERENCE_WILL_JOIN to

Notiek ielāde…
Atcelt
Saglabāt