Browse Source

full-screen: fix not re-entering full-screen after dialog is shown

This has the side effect of showing the bottom navbar when the toolbox is open,
which is a nice thing since back is accessible.
master
Saúl Ibarra Corretgé 5 years ago
parent
commit
02131f3346

+ 11
- 0
react/features/base/dialog/functions.js View File

3
 import { ColorSchemeRegistry } from '../color-scheme';
3
 import { ColorSchemeRegistry } from '../color-scheme';
4
 import { toState } from '../redux';
4
 import { toState } from '../redux';
5
 
5
 
6
+/**
7
+ * Checks if any {@code Dialog} is currently open.
8
+ *
9
+ * @param {Function|Object} stateful - The redux store, the redux
10
+ * {@code getState} function, or the redux state itself.
11
+ * @returns {boolean}
12
+ */
13
+export function isAnyDialogOpen(stateful: Function) {
14
+    return Boolean(toState(stateful)['features/base/dialog'].component);
15
+}
16
+
6
 /**
17
 /**
7
  * Checks if a {@code Dialog} with a specific {@code component} is currently
18
  * Checks if a {@code Dialog} with a specific {@code component} is currently
8
  * open.
19
  * open.

+ 5
- 2
react/features/mobile/full-screen/middleware.js View File

4
 
4
 
5
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app';
5
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app';
6
 import { getCurrentConference } from '../../base/conference';
6
 import { getCurrentConference } from '../../base/conference';
7
+import { isAnyDialogOpen } from '../../base/dialog/functions';
7
 import { Platform } from '../../base/react';
8
 import { Platform } from '../../base/react';
8
 import { MiddlewareRegistry, StateListenerRegistry } from '../../base/redux';
9
 import { MiddlewareRegistry, StateListenerRegistry } from '../../base/redux';
9
 
10
 
48
     /* selector */ state => {
49
     /* selector */ state => {
49
         const { enabled: audioOnly } = state['features/base/audio-only'];
50
         const { enabled: audioOnly } = state['features/base/audio-only'];
50
         const conference = getCurrentConference(state);
51
         const conference = getCurrentConference(state);
52
+        const dialogOpen = isAnyDialogOpen(state);
51
 
53
 
52
-        return conference ? !audioOnly : false;
54
+        return conference ? !audioOnly && !dialogOpen : false;
53
     },
55
     },
54
     /* listener */ fullScreen => _setFullScreen(fullScreen)
56
     /* listener */ fullScreen => _setFullScreen(fullScreen)
55
 );
57
 );
70
     if (appState === 'active') {
72
     if (appState === 'active') {
71
         const { enabled: audioOnly } = state['features/base/audio-only'];
73
         const { enabled: audioOnly } = state['features/base/audio-only'];
72
         const conference = getCurrentConference(state);
74
         const conference = getCurrentConference(state);
73
-        const fullScreen = conference ? !audioOnly : false;
75
+        const dialogOpen = isAnyDialogOpen(state);
76
+        const fullScreen = conference ? !audioOnly && !dialogOpen : false;
74
 
77
 
75
         _setFullScreen(fullScreen);
78
         _setFullScreen(fullScreen);
76
     }
79
     }

Loading…
Cancel
Save