Browse Source

fix(rn,labels) don't add extra margin in tile view

There is no need to skip the filmstrip, since it's not there.
master
Saúl Ibarra Corretgé 4 years ago
parent
commit
33fc3833f9
1 changed files with 10 additions and 3 deletions
  1. 10
    3
      react/features/conference/components/native/Labels.js

+ 10
- 3
react/features/conference/components/native/Labels.js View File

@@ -10,6 +10,7 @@ import {
10 10
     RecordingExpandedLabel
11 11
 } from '../../../recording';
12 12
 import { TranscribingExpandedLabel } from '../../../transcribing';
13
+import { shouldDisplayTileView } from '../../../video-layout';
13 14
 import { VideoQualityExpandedLabel } from '../../../video-quality';
14 15
 import { shouldDisplayNotifications } from '../../functions';
15 16
 import AbstractLabels, {
@@ -30,6 +31,11 @@ type Props = AbstractLabelsProps & {
30 31
      */
31 32
     _aspectRatio: Symbol,
32 33
 
34
+    /**
35
+     * True if tile view is being diaplyed, false otherwise.
36
+     */
37
+    _shouldDisplayTileView: boolean,
38
+
33 39
     /**
34 40
      * True if the labels should be visible, false otherwise.
35 41
      */
@@ -151,7 +157,7 @@ class Labels extends AbstractLabels<Props, State> {
151 157
      * @inheritdoc
152 158
      */
153 159
     render() {
154
-        const { _aspectRatio, _filmstripVisible, _visible } = this.props;
160
+        const { _aspectRatio, _filmstripVisible, _shouldDisplayTileView, _visible } = this.props;
155 161
 
156 162
         if (!_visible) {
157 163
             return null;
@@ -168,7 +174,7 @@ class Labels extends AbstractLabels<Props, State> {
168 174
                     pointerEvents = 'box-none'
169 175
                     style = { [
170 176
                         styles.indicatorContainer,
171
-                        wide && _filmstripVisible
177
+                        wide && _filmstripVisible && !_shouldDisplayTileView
172 178
                             && styles.indicatorContainerWide
173 179
                     ] }>
174 180
                     <TouchableOpacity
@@ -220,7 +226,7 @@ class Labels extends AbstractLabels<Props, State> {
220 226
                 <View
221 227
                     style = { [
222 228
                         styles.indicatorContainer,
223
-                        wide && _filmstripVisible
229
+                        wide && _filmstripVisible && !_shouldDisplayTileView
224 230
                             && styles.indicatorContainerWide
225 231
                     ] }>
226 232
                     {
@@ -358,6 +364,7 @@ function _mapStateToProps(state) {
358 364
     return {
359 365
         ..._abstractMapStateToProps(state),
360 366
         _aspectRatio: state['features/base/responsive-ui'].aspectRatio,
367
+        _shouldDisplayTileView: shouldDisplayTileView(state),
361 368
         _visible: !shouldDisplayNotifications(state)
362 369
     };
363 370
 }

Loading…
Cancel
Save