|
@@ -9,6 +9,7 @@ import {
|
9
|
9
|
sendAnalytics
|
10
|
10
|
} from '../../../analytics';
|
11
|
11
|
import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
|
12
|
+import { RAISE_HAND_ENABLED, getFeatureFlag } from '../../../base/flags';
|
12
|
13
|
import { translate } from '../../../base/i18n';
|
13
|
14
|
import {
|
14
|
15
|
getLocalParticipant,
|
|
@@ -25,6 +26,11 @@ import { type ReactionStyles } from './ReactionButton';
|
25
|
26
|
*/
|
26
|
27
|
type Props = AbstractButtonProps & {
|
27
|
28
|
|
|
29
|
+ /**
|
|
30
|
+ * Whether this button is enabled or not.
|
|
31
|
+ */
|
|
32
|
+ _enabled: boolean,
|
|
33
|
+
|
28
|
34
|
/**
|
29
|
35
|
* The local participant.
|
30
|
36
|
*/
|
|
@@ -128,7 +134,11 @@ class RaiseHandButton extends Component<Props, *> {
|
128
|
134
|
* @returns {ReactElement}
|
129
|
135
|
*/
|
130
|
136
|
render() {
|
131
|
|
- const { _styles, t } = this.props;
|
|
137
|
+ const { _enabled, _styles, t } = this.props;
|
|
138
|
+
|
|
139
|
+ if (!_enabled) {
|
|
140
|
+ return null;
|
|
141
|
+ }
|
132
|
142
|
|
133
|
143
|
return (
|
134
|
144
|
<TouchableHighlight
|
|
@@ -155,8 +165,10 @@ class RaiseHandButton extends Component<Props, *> {
|
155
|
165
|
*/
|
156
|
166
|
function _mapStateToProps(state): Object {
|
157
|
167
|
const _localParticipant = getLocalParticipant(state);
|
|
168
|
+ const enabled = getFeatureFlag(state, RAISE_HAND_ENABLED, true);
|
158
|
169
|
|
159
|
170
|
return {
|
|
171
|
+ _enabled: enabled,
|
160
|
172
|
_localParticipant,
|
161
|
173
|
_raisedHand: hasRaisedHand(_localParticipant),
|
162
|
174
|
_styles: ColorSchemeRegistry.get(state, 'Toolbox').raiseHandButton
|