Przeglądaj źródła

fix(filmstrip/toolbox) mobile ui adjustments

master
Calin Chitu 3 lat temu
rodzic
commit
be152b12d7

+ 25
- 3
react/features/filmstrip/components/native/Filmstrip.js Wyświetl plik

@@ -1,13 +1,15 @@
1 1
 // @flow
2 2
 
3 3
 import React, { PureComponent } from 'react';
4
-import { FlatList, SafeAreaView } from 'react-native';
4
+import { FlatList } from 'react-native';
5
+import { SafeAreaView } from 'react-native-safe-area-context';
5 6
 
6 7
 import { getLocalParticipant } from '../../../base/participants';
7 8
 import { Platform } from '../../../base/react';
8 9
 import { connect } from '../../../base/redux';
9 10
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
10 11
 import { shouldHideSelfView } from '../../../base/settings/functions.any';
12
+import { isToolboxVisible } from '../../../toolbox/functions';
11 13
 import { setVisibleRemoteParticipants } from '../../actions';
12 14
 import { isFilmstripVisible, shouldRemoteVideosBeVisible } from '../../functions';
13 15
 
@@ -37,6 +39,11 @@ type Props = {
37 39
      */
38 40
     _disableSelfView: boolean,
39 41
 
42
+    /**
43
+     * Whether or not the toolbox is displayed.
44
+     */
45
+    _isToolboxVisible: Boolean,
46
+
40 47
     _localParticipantId: string,
41 48
 
42 49
     /**
@@ -223,7 +230,14 @@ class Filmstrip extends PureComponent<Props> {
223 230
      * @returns {ReactElement}
224 231
      */
225 232
     render() {
226
-        const { _aspectRatio, _localParticipantId, _participants, _visible, _disableSelfView } = this.props;
233
+        const {
234
+            _aspectRatio,
235
+            _disableSelfView,
236
+            _isToolboxVisible,
237
+            _localParticipantId,
238
+            _participants,
239
+            _visible
240
+        } = this.props;
227 241
 
228 242
         if (!_visible) {
229 243
             return null;
@@ -248,7 +262,14 @@ class Filmstrip extends PureComponent<Props> {
248 262
         }
249 263
 
250 264
         return (
251
-            <SafeAreaView style = { filmstripStyle }>
265
+            <SafeAreaView
266
+                edges = { [
267
+                    !_isToolboxVisible && 'bottom',
268
+                    'top',
269
+                    'left',
270
+                    'right'
271
+                ].filter(Boolean) }
272
+                style = { filmstripStyle }>
252 273
                 {
253 274
                     this._separateLocalThumbnail
254 275
                         && !isNarrowAspectRatio
@@ -299,6 +320,7 @@ function _mapStateToProps(state) {
299 320
         _clientHeight: responsiveUI.clientHeight,
300 321
         _clientWidth: responsiveUI.clientWidth,
301 322
         _disableSelfView: disableSelfView,
323
+        _isToolboxVisible: isToolboxVisible(state),
302 324
         _localParticipantId: getLocalParticipant(state)?.id,
303 325
         _participants: showRemoteVideos ? remoteParticipants : NO_REMOTE_VIDEOS,
304 326
         _visible: enabled && isFilmstripVisible(state)

+ 1
- 1
react/features/filmstrip/components/native/styles.js Wyświetl plik

@@ -45,7 +45,7 @@ export default {
45 45
         flexDirection: 'row',
46 46
         flexGrow: 0,
47 47
         justifyContent: 'flex-end',
48
-        marginBottom: 5
48
+        marginBottom: BaseTheme.spacing[1]
49 49
     },
50 50
 
51 51
     /**

+ 4
- 1
react/features/toolbox/components/native/styles.js Wyświetl plik

@@ -100,7 +100,10 @@ const styles = {
100 100
         flexGrow: 0,
101 101
         height: '100%',
102 102
         width: '100%',
103
-        maxHeight: 80,
103
+
104
+        // TODO revisit this
105
+
106
+        maxHeight: 76,
104 107
         maxWidth: 580,
105 108
         marginLeft: 'auto',
106 109
         marginRight: 'auto'

Ładowanie…
Anuluj
Zapisz