Files
jitsi-meet/react/features/mobile/full-screen/reducer.js
Saúl Ibarra Corretgé 4757c1ebca [RN] Make full-screen more resilient on Android
On Android we go into "immersive mode" when in a conference, this is our way of
being full-creen. There are occasions, however, in which Android takes us out of
immerfive mode without us (the application / SDK) knowing: when a child activity
is started, a modal window shown, etc.

In order to be resilient to any possible change in the immersive mode, register
a listener which will be called when Android changes it, so we can re-eavluate
if we need it and thus re-enable it.
2018-02-13 15:00:36 -06:00

22 lines
472 B
JavaScript

import { ReducerRegistry } from '../../base/redux';
import { _SET_IMMERSIVE_LISTENER } from './actionTypes';
const INITIAL_STATE = {
listener: undefined
};
ReducerRegistry.register(
'features/full-screen',
(state = INITIAL_STATE, action) => {
switch (action.type) {
case _SET_IMMERSIVE_LISTENER:
return {
...state,
listener: action.listener
};
}
return state;
});