[RN] Fix full-screen mode when a dialog is opened on Android

When a dialog is opened on Android, full-screen mode is exited but we (the app)
know nothing about this. Make sure we re-enter full-screen mode once a dialog is
closed, if the conditions to be in such mode are still met.
This commit is contained in:
Saúl Ibarra Corretgé 2017-04-19 16:30:15 +02:00 committed by Lyubo Marinov
parent d9538845bc
commit 0c16842e0d
1 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import {
CONFERENCE_WILL_JOIN,
SET_AUDIO_ONLY
} from '../../base/conference';
import { HIDE_DIALOG } from '../../base/dialog';
import { Platform } from '../../base/react';
import { MiddlewareRegistry } from '../../base/redux';
@ -52,6 +53,14 @@ MiddlewareRegistry.register(store => next => action => {
fullScreen = false;
break;
case HIDE_DIALOG: {
const { audioOnly, conference }
= store.getState()['features/base/conference'];
fullScreen = conference ? !audioOnly : false;
break;
}
case SET_AUDIO_ONLY:
fullScreen = !action.audioOnly;
break;