|
|
@@ -1,11 +1,12 @@
|
|
1
|
1
|
// @flow
|
|
2
|
2
|
|
|
3
|
3
|
import React, { PureComponent } from 'react';
|
|
4
|
|
-import { Platform } from 'react-native';
|
|
|
4
|
+import { Platform, TouchableOpacity, View } from 'react-native';
|
|
5
|
5
|
import Collapsible from 'react-native-collapsible';
|
|
6
|
6
|
|
|
7
|
7
|
import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
|
8
|
8
|
import { BottomSheet, hideDialog, isDialogOpen } from '../../../base/dialog';
|
|
|
9
|
+import { IconDragHandle } from '../../../base/icons';
|
|
9
|
10
|
import { CHAT_ENABLED, IOS_RECORDING_ENABLED, getFeatureFlag } from '../../../base/flags';
|
|
10
|
11
|
import { connect } from '../../../base/redux';
|
|
11
|
12
|
import { StyleType } from '../../../base/styles';
|
|
|
@@ -23,6 +24,7 @@ import AudioOnlyButton from './AudioOnlyButton';
|
|
23
|
24
|
import MoreOptionsButton from './MoreOptionsButton';
|
|
24
|
25
|
import RaiseHandButton from './RaiseHandButton';
|
|
25
|
26
|
import ToggleCameraButton from './ToggleCameraButton';
|
|
|
27
|
+import styles from './styles';
|
|
26
|
28
|
|
|
27
|
29
|
/**
|
|
28
|
30
|
* The type of the React {@code Component} props of {@link OverflowMenu}.
|
|
|
@@ -99,6 +101,7 @@ class OverflowMenu extends PureComponent<Props, State> {
|
|
99
|
101
|
this._onCancel = this._onCancel.bind(this);
|
|
100
|
102
|
this._onSwipe = this._onSwipe.bind(this);
|
|
101
|
103
|
this._onToggleMenu = this._onToggleMenu.bind(this);
|
|
|
104
|
+ this._renderMenuExpandToggle = this._renderMenuExpandToggle.bind(this);
|
|
102
|
105
|
}
|
|
103
|
106
|
|
|
104
|
107
|
/**
|
|
|
@@ -126,7 +129,8 @@ class OverflowMenu extends PureComponent<Props, State> {
|
|
126
|
129
|
return (
|
|
127
|
130
|
<BottomSheet
|
|
128
|
131
|
onCancel = { this._onCancel }
|
|
129
|
|
- onSwipe = { this._onSwipe }>
|
|
|
132
|
+ onSwipe = { this._onSwipe }
|
|
|
133
|
+ renderHeader = { this._renderMenuExpandToggle }>
|
|
130
|
134
|
<AudioRouteButton { ...buttonProps } />
|
|
131
|
135
|
<ToggleCameraButton { ...buttonProps } />
|
|
132
|
136
|
<AudioOnlyButton { ...buttonProps } />
|
|
|
@@ -153,6 +157,28 @@ class OverflowMenu extends PureComponent<Props, State> {
|
|
153
|
157
|
);
|
|
154
|
158
|
}
|
|
155
|
159
|
|
|
|
160
|
+ _renderMenuExpandToggle: () => React$Element<any>;
|
|
|
161
|
+
|
|
|
162
|
+ /**
|
|
|
163
|
+ * Function to render the menu toggle in the bottom sheet header area.
|
|
|
164
|
+ *
|
|
|
165
|
+ * @returns {React$Element}
|
|
|
166
|
+ */
|
|
|
167
|
+ _renderMenuExpandToggle() {
|
|
|
168
|
+ return (
|
|
|
169
|
+ <View
|
|
|
170
|
+ style = { [
|
|
|
171
|
+ this.props._bottomSheetStyles.sheet,
|
|
|
172
|
+ styles.expandMenuContainer
|
|
|
173
|
+ ] }>
|
|
|
174
|
+ <TouchableOpacity onPress = { this._onToggleMenu }>
|
|
|
175
|
+ { /* $FlowFixMeProps */ }
|
|
|
176
|
+ <IconDragHandle style = { this.props._bottomSheetStyles.expandIcon } />
|
|
|
177
|
+ </TouchableOpacity>
|
|
|
178
|
+ </View>
|
|
|
179
|
+ );
|
|
|
180
|
+ }
|
|
|
181
|
+
|
|
156
|
182
|
_onCancel: () => boolean;
|
|
157
|
183
|
|
|
158
|
184
|
/**
|