Browse Source

fix(native) add missing function

master
Tudor-Ovidiu Avram 4 years ago
parent
commit
a270e4300a

+ 20
- 0
react/features/conference/functions.any.js View File

1
+import { toState } from '../base/redux';
2
+import { areThereNotifications } from '../notifications';
3
+import { getOverlayToRender } from '../overlay';
4
+
5
+/**
6
+ * Tells whether or not the notifications should be displayed within
7
+ * the conference feature based on the current Redux state.
8
+ *
9
+ * @param {Object|Function} stateful - The redux store state.
10
+ * @returns {boolean}
11
+ */
12
+export function shouldDisplayNotifications(stateful) {
13
+    const state = toState(stateful);
14
+    const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
15
+    const { calleeInfoVisible } = state['features/invite'];
16
+
17
+    return areThereNotifications(state)
18
+      && !isAnyOverlayVisible
19
+      && !calleeInfoVisible;
20
+}

+ 1
- 0
react/features/conference/functions.native.js View File

1
+export * from './functions.any';

+ 3
- 22
react/features/conference/functions.web.js View File

4
 import { getLocalParticipant } from '../base/participants';
4
 import { getLocalParticipant } from '../base/participants';
5
 import { toState } from '../base/redux';
5
 import { toState } from '../base/redux';
6
 import { getBackendSafePath, getJitsiMeetGlobalNS } from '../base/util';
6
 import { getBackendSafePath, getJitsiMeetGlobalNS } from '../base/util';
7
-import {
8
-    areThereNotifications,
9
-    showWarningNotification
10
-} from '../notifications';
11
-import { getOverlayToRender } from '../overlay';
7
+import { showWarningNotification } from '../notifications';
12
 import { createRnnoiseProcessorPromise } from '../rnnoise';
8
 import { createRnnoiseProcessorPromise } from '../rnnoise';
13
 
9
 
10
+export * from './functions.any';
11
+
14
 /**
12
 /**
15
  * Returns the result of getWiFiStats from the global NS or does nothing
13
  * Returns the result of getWiFiStats from the global NS or does nothing
16
 (returns empty result).
14
 (returns empty result).
52
     }
50
     }
53
 }
51
 }
54
 
52
 
55
-/**
56
- * Tells whether or not the notifications should be displayed within
57
- * the conference feature based on the current Redux state.
58
- *
59
- * @param {Object|Function} stateful - The redux store state.
60
- * @returns {boolean}
61
- */
62
-export function shouldDisplayNotifications(stateful) {
63
-    const state = toState(stateful);
64
-    const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
65
-    const { calleeInfoVisible } = state['features/invite'];
66
-
67
-    return areThereNotifications(state)
68
-            && !isAnyOverlayVisible
69
-            && !calleeInfoVisible;
70
-}
71
-
72
 /**
53
 /**
73
  * Returns an object aggregating the conference options.
54
  * Returns an object aggregating the conference options.
74
  *
55
  *

Loading…
Cancel
Save