|
@@ -4,10 +4,8 @@ import React, { Component } from 'react';
|
4
|
4
|
import { Platform } from 'react-native';
|
5
|
5
|
|
6
|
6
|
import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
7
|
|
-import {
|
8
|
|
- BottomSheet,
|
9
|
|
- hideDialog
|
10
|
|
-} from '../../../base/dialog';
|
|
7
|
+import { BottomSheet, hideDialog } from '../../../base/dialog';
|
|
8
|
+import { IOS_RECORDING_ENABLED, getFeatureFlag } from '../../../base/flags';
|
11
|
9
|
import { connect } from '../../../base/redux';
|
12
|
10
|
import { StyleType } from '../../../base/styles';
|
13
|
11
|
import { InfoDialogButton, InviteButton } from '../../../invite';
|
|
@@ -21,8 +19,6 @@ import AudioOnlyButton from './AudioOnlyButton';
|
21
|
19
|
import RaiseHandButton from './RaiseHandButton';
|
22
|
20
|
import ToggleCameraButton from './ToggleCameraButton';
|
23
|
21
|
|
24
|
|
-declare var __DEV__;
|
25
|
|
-
|
26
|
22
|
/**
|
27
|
23
|
* The type of the React {@code Component} props of {@link OverflowMenu}.
|
28
|
24
|
*/
|
|
@@ -33,6 +29,11 @@ type Props = {
|
33
|
29
|
*/
|
34
|
30
|
_bottomSheetStyles: StyleType,
|
35
|
31
|
|
|
32
|
+ /**
|
|
33
|
+ * Whether the recoding button should be enabled or not.
|
|
34
|
+ */
|
|
35
|
+ _recordingEnabled: boolean,
|
|
36
|
+
|
36
|
37
|
/**
|
37
|
38
|
* Used for hiding the dialog when the selection was completed.
|
38
|
39
|
*/
|
|
@@ -86,11 +87,7 @@ class OverflowMenu extends Component<Props> {
|
86
|
87
|
<RoomLockButton { ...buttonProps } />
|
87
|
88
|
<ClosedCaptionButton { ...buttonProps } />
|
88
|
89
|
{
|
89
|
|
-
|
90
|
|
- // Apple rejected our app because they claim requiring a
|
91
|
|
- // Dropbox account for recording is not acceptable.
|
92
|
|
- // Ddisable it until we can find a way around it.
|
93
|
|
- (__DEV__ || Platform.OS !== 'ios')
|
|
90
|
+ this.props._recordingEnabled
|
94
|
91
|
&& <RecordButton { ...buttonProps } />
|
95
|
92
|
}
|
96
|
93
|
<LiveStreamButton { ...buttonProps } />
|
|
@@ -121,13 +118,15 @@ class OverflowMenu extends Component<Props> {
|
121
|
118
|
* @param {Object} state - Redux state.
|
122
|
119
|
* @private
|
123
|
120
|
* @returns {{
|
124
|
|
- * _bottomSheetStyles: StyleType
|
|
121
|
+ * _bottomSheetStyles: StyleType,
|
|
122
|
+ * _recordingEnabled: boolean
|
125
|
123
|
* }}
|
126
|
124
|
*/
|
127
|
125
|
function _mapStateToProps(state) {
|
128
|
126
|
return {
|
129
|
127
|
_bottomSheetStyles:
|
130
|
|
- ColorSchemeRegistry.get(state, 'BottomSheet')
|
|
128
|
+ ColorSchemeRegistry.get(state, 'BottomSheet'),
|
|
129
|
+ _recordingEnabled: Platform.OS !== 'ios' || getFeatureFlag(state, IOS_RECORDING_ENABLED)
|
131
|
130
|
};
|
132
|
131
|
}
|
133
|
132
|
|