Quellcode durchsuchen

[R] Fix call/ring overlay

There were regressions in the form of JS errors in Filmstrip introduced
when the call/ring overlay was rewritten in React.
master
Lyubo Marinov vor 8 Jahren
Ursprung
Commit
9591226be6
1 geänderte Dateien mit 9 neuen und 2 gelöschten Zeilen
  1. 9
    2
      react/features/filmstrip/middleware.js

+ 9
- 2
react/features/filmstrip/middleware.js Datei anzeigen

@@ -17,7 +17,7 @@ declare var APP: Object;
17 17
 MiddlewareRegistry.register(({ getState }) => next => action => {
18 18
     switch (action.type) {
19 19
     case SET_CALL_OVERLAY_VISIBLE:
20
-        if (typeof APP === 'undefined') {
20
+        if (typeof APP !== 'undefined') {
21 21
             const oldValue
22 22
                 = Boolean(getState()['features/jwt'].callOverlayVisible);
23 23
             const result = next(action);
@@ -25,7 +25,14 @@ MiddlewareRegistry.register(({ getState }) => next => action => {
25 25
                 = Boolean(getState()['features/jwt'].callOverlayVisible);
26 26
 
27 27
             oldValue === newValue
28
-                || Filmstrip.toggleFilmstrip(!newValue, false);
28
+
29
+                // FIXME The following accesses the private state filmstrip of
30
+                // Filmstrip. It is written with the understanding that
31
+                // Filmstrip will be rewritten in React and, consequently, will
32
+                // not need the middleware implemented here, Filmstrip.init, and
33
+                // UI.start.
34
+                || (Filmstrip.filmstrip
35
+                    && Filmstrip.toggleFilmstrip(!newValue, false));
29 36
 
30 37
             return result;
31 38
         }

Laden…
Abbrechen
Speichern