Przeglądaj źródła

[RN] Allow share-room ToolbarButton to not be rendered

j8
Lyubo Marinov 8 lat temu
rodzic
commit
9049f52402
1 zmienionych plików z 19 dodań i 6 usunięć
  1. 19
    6
      react/features/toolbox/components/Toolbox.native.js

+ 19
- 6
react/features/toolbox/components/Toolbox.native.js Wyświetl plik

@@ -22,6 +22,16 @@ import {
22 22
 import styles from './styles';
23 23
 import ToolbarButton from './ToolbarButton';
24 24
 
25
+/**
26
+ * The indicator which determines (at bundle time) whether there should be a
27
+ * {@code ToolbarButton} in {@code Toolbox} to expose the functionality of the
28
+ * feature share-room in the user interface of the app.
29
+ *
30
+ * @private
31
+ * @type {boolean}
32
+ */
33
+const _SHARE_ROOM_TOOLBAR_BUTTON = true;
34
+
25 35
 /**
26 36
  * Implements the conference toolbox on React Native.
27 37
  */
@@ -273,12 +283,15 @@ class Toolbox extends Component {
273 283
                     onClick = { this.props._onToggleAudioOnly }
274 284
                     style = { style }
275 285
                     underlayColor = { underlayColor } />
276
-                <ToolbarButton
277
-                    iconName = 'link'
278
-                    iconStyle = { iconStyle }
279
-                    onClick = { this.props._onShareRoom }
280
-                    style = { style }
281
-                    underlayColor = { underlayColor } />
286
+                {
287
+                    _SHARE_ROOM_TOOLBAR_BUTTON
288
+                        && <ToolbarButton
289
+                            iconName = 'link'
290
+                            iconStyle = { iconStyle }
291
+                            onClick = { this.props._onShareRoom }
292
+                            style = { style }
293
+                            underlayColor = { underlayColor } />
294
+                }
282 295
             </View>
283 296
         );
284 297
 

Ładowanie…
Anuluj
Zapisz