Selaa lähdekoodia

[RN] Toggle audio-only icon based on state

master
Saúl Ibarra Corretgé 8 vuotta sitten
vanhempi
commit
f878f54b4d
1 muutettua tiedostoa jossa 18 lisäystä ja 1 poistoa
  1. 18
    1
      react/features/toolbox/components/Toolbox.native.js

+ 18
- 1
react/features/toolbox/components/Toolbox.native.js Näytä tiedosto

@@ -31,6 +31,11 @@ class Toolbox extends Component {
31 31
          */
32 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 40
          * Flag showing whether room is locked.
36 41
          */
@@ -207,7 +212,9 @@ class Toolbox extends Component {
207 212
                     style = { style }
208 213
                     underlayColor = { underlayColor } />
209 214
                 <ToolbarButton
210
-                    iconName = 'visibility'
215
+                    iconName = {
216
+                        this.props._audioOnly ? 'visibility-off' : 'visibility'
217
+                    }
211 218
                     iconStyle = { iconStyle }
212 219
                     onClick = { this.props._onToggleAudioOnly }
213 220
                     style = { style }
@@ -305,6 +312,7 @@ function _mapDispatchToProps(dispatch) {
305 312
  *
306 313
  * @param {Object} state - Redux store.
307 314
  * @returns {{
315
+ *     _audioOnly: boolean,
308 316
  *     _locked: boolean
309 317
  * }}
310 318
  * @private
@@ -315,6 +323,15 @@ function _mapStateToProps(state) {
315 323
     return {
316 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 336
          * The indicator which determines whether the conference is
320 337
          * locked/password-protected.

Loading…
Peruuta
Tallenna