Quellcode durchsuchen

fix(rn,toolbox) fill gap underneath Toolbox

This is for devices without the home button.
j8
Saúl Ibarra Corretgé vor 4 Jahren
Ursprung
Commit
9d4e49a5af

+ 3
- 5
react/features/conference/components/native/Conference.js Datei anzeigen

@@ -1,7 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import React from 'react';
4
-import { NativeModules, SafeAreaView, StatusBar } from 'react-native';
4
+import { NativeModules, SafeAreaView, StatusBar, View } from 'react-native';
5 5
 
6 6
 import { appNavigate } from '../../../app/actions';
7 7
 import { PIP_ENABLED, FULLSCREEN_ENABLED, getFeatureFlag } from '../../../base/flags';
@@ -272,7 +272,7 @@ class Conference extends AbstractConference<Props, *> {
272 272
                         </TintedView>
273 273
                 }
274 274
 
275
-                <SafeAreaView
275
+                <View
276 276
                     pointerEvents = 'box-none'
277 277
                     style = { styles.toolboxAndFilmstripContainer }>
278 278
 
@@ -285,10 +285,8 @@ class Conference extends AbstractConference<Props, *> {
285 285
                     <LonelyMeetingExperience />
286 286
 
287 287
                     { _shouldDisplayTileView ? undefined : <Filmstrip /> }
288
-
289 288
                     <Toolbox />
290
-
291
-                </SafeAreaView>
289
+                </View>
292 290
 
293 291
                 <SafeAreaView
294 292
                     pointerEvents = 'box-none'

+ 31
- 41
react/features/toolbox/components/native/Toolbox.js Datei anzeigen

@@ -1,10 +1,9 @@
1 1
 // @flow
2 2
 
3 3
 import React, { PureComponent } from 'react';
4
-import { View } from 'react-native';
4
+import { SafeAreaView, View } from 'react-native';
5 5
 
6 6
 import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
-import { Container } from '../../../base/react';
8 7
 import { connect } from '../../../base/redux';
9 8
 import { StyleType } from '../../../base/styles';
10 9
 import { ChatButton } from '../../../chat';
@@ -48,12 +47,37 @@ class Toolbox extends PureComponent<Props> {
48 47
      * @returns {ReactElement}
49 48
      */
50 49
     render() {
50
+        if (!this.props._visible) {
51
+            return null;
52
+        }
53
+
54
+        const { _styles } = this.props;
55
+        const { buttonStylesBorderless, hangupButtonStyles, toggledButtonStyles } = _styles;
56
+
51 57
         return (
52
-            <Container
53
-                style = { styles.toolbox }
54
-                visible = { this.props._visible }>
55
-                { this._renderToolbar() }
56
-            </Container>
58
+            <View
59
+                pointerEvents = 'box-none'
60
+                style = { styles.toolboxContainer }>
61
+                <SafeAreaView
62
+                    accessibilityRole = 'toolbar'
63
+                    pointerEvents = 'box-none'
64
+                    style = { styles.toolbox }>
65
+                    <AudioMuteButton
66
+                        styles = { buttonStylesBorderless }
67
+                        toggledStyles = { toggledButtonStyles } />
68
+                    <VideoMuteButton
69
+                        styles = { buttonStylesBorderless }
70
+                        toggledStyles = { toggledButtonStyles } />
71
+                    <ChatButton
72
+                        styles = { buttonStylesBorderless }
73
+                        toggledStyles = { this._getChatButtonToggledStyle(toggledButtonStyles) } />
74
+                    <OverflowMenuButton
75
+                        styles = { buttonStylesBorderless }
76
+                        toggledStyles = { toggledButtonStyles } />
77
+                    <HangupButton
78
+                        styles = { hangupButtonStyles } />
79
+                </SafeAreaView>
80
+            </View>
57 81
         );
58 82
     }
59 83
 
@@ -87,40 +111,6 @@ class Toolbox extends PureComponent<Props> {
87 111
             ]
88 112
         };
89 113
     }
90
-
91
-    /**
92
-     * Renders the toolbar. In order to avoid a weird visual effect in which the
93
-     * toolbar is (visually) rendered and then visibly changes its size, it is
94
-     * rendered only after we've figured out the width available to the toolbar.
95
-     *
96
-     * @returns {React$Node}
97
-     */
98
-    _renderToolbar() {
99
-        const { _styles } = this.props;
100
-        const { buttonStylesBorderless, hangupButtonStyles, toggledButtonStyles } = _styles;
101
-
102
-        return (
103
-            <View
104
-                accessibilityRole = 'toolbar'
105
-                pointerEvents = 'box-none'
106
-                style = { styles.toolbar }>
107
-                <AudioMuteButton
108
-                    styles = { buttonStylesBorderless }
109
-                    toggledStyles = { toggledButtonStyles } />
110
-                <VideoMuteButton
111
-                    styles = { buttonStylesBorderless }
112
-                    toggledStyles = { toggledButtonStyles } />
113
-                <ChatButton
114
-                    styles = { buttonStylesBorderless }
115
-                    toggledStyles = { this._getChatButtonToggledStyle(toggledButtonStyles) } />
116
-                <OverflowMenuButton
117
-                    styles = { buttonStylesBorderless }
118
-                    toggledStyles = { toggledButtonStyles } />
119
-                <HangupButton
120
-                    styles = { hangupButtonStyles } />
121
-            </View>
122
-        );
123
-    }
124 114
 }
125 115
 
126 116
 /**

+ 3
- 3
react/features/toolbox/components/native/styles.js Datei anzeigen

@@ -62,7 +62,7 @@ const styles = {
62 62
     /**
63 63
      * The style of the toolbar.
64 64
      */
65
-    toolbar: {
65
+    toolbox: {
66 66
         alignItems: 'center',
67 67
         backgroundColor: ColorPalette.darkBackground,
68 68
         borderRadius: 3,
@@ -74,9 +74,9 @@ const styles = {
74 74
     },
75 75
 
76 76
     /**
77
-     * The style of the root/top-level {@link Container} of {@link Toolbox}.
77
+     * The style of the root/top-level container of {@link Toolbox}.
78 78
      */
79
-    toolbox: {
79
+    toolboxContainer: {
80 80
         flexDirection: 'column',
81 81
         flexGrow: 0,
82 82
         width: '100%',

Laden…
Abbrechen
Speichern