Browse Source

style(Thumbnail): improve readability

Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
master
Hristo Terezov 4 years ago
parent
commit
3d97bef308
1 changed files with 7 additions and 8 deletions
  1. 7
    8
      react/features/filmstrip/components/web/Thumbnail.js

+ 7
- 8
react/features/filmstrip/components/web/Thumbnail.js View File

@@ -345,9 +345,8 @@ class Thumbnail extends Component<Props, State> {
345 345
         return (
346 346
             <div>
347 347
                 <AtlasKitThemeProvider mode = 'dark'>
348
-                    { _connectionIndicatorDisabled
349
-                        ? null
350
-                        : <ConnectionIndicator
348
+                    { !_connectionIndicatorDisabled
349
+                        && <ConnectionIndicator
351 350
                             alwaysVisible = { showConnectionIndicator }
352 351
                             enableStatsDisplay = { true }
353 352
                             iconSize = { iconSize }
@@ -360,10 +359,10 @@ class Thumbnail extends Component<Props, State> {
360 359
                         participantId = { id }
361 360
                         tooltipPosition = { tooltipPosition } />
362 361
                     { showDominantSpeaker && _participantCount > 2
363
-                        ? <DominantSpeakerIndicator
362
+                        && <DominantSpeakerIndicator
364 363
                             iconSize = { iconSize }
365 364
                             tooltipPosition = { tooltipPosition } />
366
-                        : null }
365
+                    }
367 366
                 </AtlasKitThemeProvider>
368 367
             </div>);
369 368
     }
@@ -452,7 +451,7 @@ class Thumbnail extends Component<Props, State> {
452 451
 
453 452
         // hide volume when in silent mode
454 453
         const onVolumeChange = _startSilent ? undefined : this._onVolumeChange;
455
-        const { jitsiTrack } = _audioTrack ?? {};
454
+        const jitsiTrack = _audioTrack?.jitsiTrack;
456 455
         const audioTrackId = jitsiTrack && jitsiTrack.getId();
457 456
 
458 457
         return (
@@ -461,7 +460,7 @@ class Thumbnail extends Component<Props, State> {
461 460
                     _audioTrack
462 461
                         ? <AudioTrack
463 462
                             audioTrack = { _audioTrack }
464
-                            id = { `remoteAudio_${audioTrackId}` }
463
+                            id = { `remoteAudio_${audioTrackId || ''}` }
465 464
                             muted = { _startSilent }
466 465
                             onAudioElementReferenceChanged = { this._onAudioElementReferenceChanged }
467 466
                             volume = { this.state.volume } />
@@ -542,7 +541,7 @@ class Thumbnail extends Component<Props, State> {
542 541
             return null;
543 542
         }
544 543
 
545
-        const { isFakeParticipant, local = false } = _participant;
544
+        const { isFakeParticipant, local } = _participant;
546 545
 
547 546
         if (local) {
548 547
             return this._renderLocalParticipant();

Loading…
Cancel
Save