Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(rn,reactions) don't show raise hand button in menu if disabled

Saúl Ibarra Corretgéd1ac4ea63706
diff --git a/react/features/reactions/components/native/RaiseHandButton.js b/react/features/reactions/components/native/RaiseHandButton.js
index f8c618cac4..5a55505b25 100644
--- a/react/features/reactions/components/native/RaiseHandButton.js
+++ b/react/features/reactions/components/native/RaiseHandButton.js
@@ -9,6 +9,7 @@ import {
sendAnalytics
} from '../../../analytics';
import { ColorSchemeRegistry } from '../../../base/color-scheme';
+import { RAISE_HAND_ENABLED, getFeatureFlag } from '../../../base/flags';
import { translate } from '../../../base/i18n';
import {
getLocalParticipant,
@@ -25,6 +26,11 @@ import { type ReactionStyles } from './ReactionButton';
*/
type Props = AbstractButtonProps & {
+ /**
+ * Whether this button is enabled or not.
+ */
+ _enabled: boolean,
+
/**
* The local participant.
*/
@@ -128,7 +134,11 @@ class RaiseHandButton extends Component<Props, *> {
* @returns {ReactElement}
*/
render() {
- const { _styles, t } = this.props;
+ const { _enabled, _styles, t } = this.props;
+
+ if (!_enabled) {
+ return null;
+ }
return (
<TouchableHighlight
@@ -155,8 +165,10 @@ class RaiseHandButton extends Component<Props, *> {
*/
function _mapStateToProps(state): Object {
const _localParticipant = getLocalParticipant(state);
+ const enabled = getFeatureFlag(state, RAISE_HAND_ENABLED, true);
return {
+ _enabled: enabled,
_localParticipant,
_raisedHand: hasRaisedHand(_localParticipant),
_styles: ColorSchemeRegistry.get(state, 'Toolbox').raiseHandButton