[RN] Fix Android immersive mode when coming from the background

Fixes an issue where immersive mode would be enabled when coming back from the
background on the welcome screen.

Re-fixes c57e713, which was not correct.
This commit is contained in:
Saúl Ibarra Corretgé 2017-02-20 13:49:30 +01:00 committed by Lyubo Marinov
parent aaf7a38cce
commit 9b40572921
1 changed files with 5 additions and 4 deletions

View File

@ -31,17 +31,18 @@ MiddlewareRegistry.register(store => next => action => {
// Check if we just came back from the background and reenable full // Check if we just came back from the background and reenable full
// screen mode if necessary. // screen mode if necessary.
if (action.appState === 'active') { if (action.appState === 'active') {
const conference = store.getState()['features/base/conference']; const { conference, audioOnly }
= store.getState()['features/base/conference'];
fullScreen = conference ? !conference.audioOnly : false; fullScreen = conference ? !audioOnly : false;
} }
break; break;
} }
case CONFERENCE_WILL_JOIN: { case CONFERENCE_WILL_JOIN: {
const conference = store.getState()['features/base/conference']; const { audioOnly } = store.getState()['features/base/conference'];
fullScreen = !conference.audioOnly; fullScreen = !audioOnly;
break; break;
} }