Browse Source

[RN] Toggle audio-only icon based on state

master
Saúl Ibarra Corretgé 8 years ago
parent
commit
f878f54b4d
1 changed files with 18 additions and 1 deletions
  1. 18
    1
      react/features/toolbox/components/Toolbox.native.js

+ 18
- 1
react/features/toolbox/components/Toolbox.native.js View File

31
          */
31
          */
32
         _audioMuted: React.PropTypes.bool,
32
         _audioMuted: React.PropTypes.bool,
33
 
33
 
34
+        /**
35
+         * Flag showing whether the audio-only mode is in use.
36
+         */
37
+        _audioOnly: React.PropTypes.bool,
38
+
34
         /**
39
         /**
35
          * Flag showing whether room is locked.
40
          * Flag showing whether room is locked.
36
          */
41
          */
207
                     style = { style }
212
                     style = { style }
208
                     underlayColor = { underlayColor } />
213
                     underlayColor = { underlayColor } />
209
                 <ToolbarButton
214
                 <ToolbarButton
210
-                    iconName = 'visibility'
215
+                    iconName = {
216
+                        this.props._audioOnly ? 'visibility-off' : 'visibility'
217
+                    }
211
                     iconStyle = { iconStyle }
218
                     iconStyle = { iconStyle }
212
                     onClick = { this.props._onToggleAudioOnly }
219
                     onClick = { this.props._onToggleAudioOnly }
213
                     style = { style }
220
                     style = { style }
305
  *
312
  *
306
  * @param {Object} state - Redux store.
313
  * @param {Object} state - Redux store.
307
  * @returns {{
314
  * @returns {{
315
+ *     _audioOnly: boolean,
308
  *     _locked: boolean
316
  *     _locked: boolean
309
  * }}
317
  * }}
310
  * @private
318
  * @private
315
     return {
323
     return {
316
         ...abstractMapStateToProps(state),
324
         ...abstractMapStateToProps(state),
317
 
325
 
326
+        /**
327
+         * The indicator which determines whether the conference is in
328
+         * audio-only mode.
329
+         *
330
+         * @protected
331
+         * @type {boolean}
332
+         */
333
+        _audioOnly: Boolean(conference.audioOnly),
334
+
318
         /**
335
         /**
319
          * The indicator which determines whether the conference is
336
          * The indicator which determines whether the conference is
320
          * locked/password-protected.
337
          * locked/password-protected.

Loading…
Cancel
Save