[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.
This commit is contained in:
Lyubo Marinov 2017-06-10 17:47:37 -05:00
parent 718de31e04
commit 9591226be6
1 changed files with 9 additions and 2 deletions

View File

@ -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;
}