From 9591226be69b2ed4205e9522ee0e9f42dce77535 Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Sat, 10 Jun 2017 17:47:37 -0500 Subject: [PATCH] [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. --- react/features/filmstrip/middleware.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/react/features/filmstrip/middleware.js b/react/features/filmstrip/middleware.js index d9d90e655..132776a70 100644 --- a/react/features/filmstrip/middleware.js +++ b/react/features/filmstrip/middleware.js @@ -17,7 +17,7 @@ declare var APP: Object; MiddlewareRegistry.register(({ getState }) => next => action => { switch (action.type) { case SET_CALL_OVERLAY_VISIBLE: - if (typeof APP === 'undefined') { + if (typeof APP !== 'undefined') { const oldValue = Boolean(getState()['features/jwt'].callOverlayVisible); const result = next(action); @@ -25,7 +25,14 @@ MiddlewareRegistry.register(({ getState }) => next => action => { = Boolean(getState()['features/jwt'].callOverlayVisible); oldValue === newValue - || Filmstrip.toggleFilmstrip(!newValue, false); + + // FIXME The following accesses the private state filmstrip of + // Filmstrip. It is written with the understanding that + // Filmstrip will be rewritten in React and, consequently, will + // not need the middleware implemented here, Filmstrip.init, and + // UI.start. + || (Filmstrip.filmstrip + && Filmstrip.toggleFilmstrip(!newValue, false)); return result; }