|  | @@ -3,6 +3,7 @@
 | 
		
	
		
			
			| 3 | 3 |  import { StatusBar } from 'react-native';
 | 
		
	
		
			
			| 4 | 4 |  import { Immersive } from 'react-native-immersive';
 | 
		
	
		
			
			| 5 | 5 |  
 | 
		
	
		
			
			|  | 6 | +import { APP_STATE_CHANGED } from '../background';
 | 
		
	
		
			
			| 6 | 7 |  import {
 | 
		
	
		
			
			| 7 | 8 |      CONFERENCE_FAILED,
 | 
		
	
		
			
			| 8 | 9 |      CONFERENCE_LEFT,
 | 
		
	
	
		
			
			|  | @@ -23,9 +24,20 @@ import { MiddlewareRegistry } from '../base/redux';
 | 
		
	
		
			
			| 23 | 24 |   * @returns {Function}
 | 
		
	
		
			
			| 24 | 25 |   */
 | 
		
	
		
			
			| 25 | 26 |  MiddlewareRegistry.register(store => next => action => {
 | 
		
	
		
			
			| 26 |  | -    let fullScreen;
 | 
		
	
		
			
			|  | 27 | +    let fullScreen = null;
 | 
		
	
		
			
			| 27 | 28 |  
 | 
		
	
		
			
			| 28 | 29 |      switch (action.type) {
 | 
		
	
		
			
			|  | 30 | +    case APP_STATE_CHANGED: {
 | 
		
	
		
			
			|  | 31 | +        // Check if we just came back from the background and reenable full
 | 
		
	
		
			
			|  | 32 | +        // screen mode if necessary.
 | 
		
	
		
			
			|  | 33 | +        if (action.appState === 'active') {
 | 
		
	
		
			
			|  | 34 | +            const conference = store.getState()['features/base/conference'];
 | 
		
	
		
			
			|  | 35 | +
 | 
		
	
		
			
			|  | 36 | +            fullScreen = conference ? !conference.audioOnly : false;
 | 
		
	
		
			
			|  | 37 | +        }
 | 
		
	
		
			
			|  | 38 | +        break;
 | 
		
	
		
			
			|  | 39 | +    }
 | 
		
	
		
			
			|  | 40 | +
 | 
		
	
		
			
			| 29 | 41 |      case CONFERENCE_WILL_JOIN: {
 | 
		
	
		
			
			| 30 | 42 |          const conference = store.getState()['features/base/conference'];
 | 
		
	
		
			
			| 31 | 43 |  
 | 
		
	
	
		
			
			|  | @@ -37,10 +49,6 @@ MiddlewareRegistry.register(store => next => action => {
 | 
		
	
		
			
			| 37 | 49 |      case CONFERENCE_LEFT:
 | 
		
	
		
			
			| 38 | 50 |          fullScreen = false;
 | 
		
	
		
			
			| 39 | 51 |          break;
 | 
		
	
		
			
			| 40 |  | -
 | 
		
	
		
			
			| 41 |  | -    default:
 | 
		
	
		
			
			| 42 |  | -        fullScreen = null;
 | 
		
	
		
			
			| 43 |  | -        break;
 | 
		
	
		
			
			| 44 | 52 |      }
 | 
		
	
		
			
			| 45 | 53 |  
 | 
		
	
		
			
			| 46 | 54 |      if (fullScreen !== null) {
 |