Просмотр исходного кода

feat(participants-pane) updates

- Fixed react native community slider to work on both android and ios
- Removed InviteButton from native menus
- Fixed buttons spacing in native OverflowMenu
- Participant context menu details are shown only for remote participants
master
Calinteodor 3 лет назад
Родитель
Сommit
d6c821d524
Аккаунт пользователя с таким Email не найден

+ 2
- 1
android/sdk/build.gradle Просмотреть файл

@@ -70,11 +70,12 @@ dependencies {
70 70
     implementation project(':react-native-default-preference')
71 71
     implementation project(':react-native-immersive')
72 72
     implementation project(':react-native-keep-awake')
73
+    implementation project(':react-native-slider')
73 74
     implementation project(':react-native-sound')
75
+    implementation project(':react-native-splash-screen')
74 76
     implementation project(':react-native-svg')
75 77
     implementation project(':react-native-webrtc')
76 78
     implementation project(':react-native-webview')
77
-    implementation project(':react-native-splash-screen')
78 79
 
79 80
     testImplementation 'junit:junit:4.12'
80 81
 }

+ 1
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Просмотреть файл

@@ -187,6 +187,7 @@ class ReactInstanceManagerHolder {
187 187
                 new com.ocetnik.timer.BackgroundTimerPackage(),
188 188
                 new com.reactnativecommunity.asyncstorage.AsyncStoragePackage(),
189 189
                 new com.reactnativecommunity.netinfo.NetInfoPackage(),
190
+                new com.reactnativecommunity.slider.ReactSliderPackage(),
190 191
                 new com.reactnativecommunity.webview.RNCWebViewPackage(),
191 192
                 new com.rnimmersive.RNImmersivePackage(),
192 193
                 new com.zmxv.RNSound.RNSoundPackage(),

+ 3
- 1
android/settings.gradle Просмотреть файл

@@ -19,6 +19,8 @@ include ':react-native-immersive'
19 19
 project(':react-native-immersive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-immersive/android')
20 20
 include ':react-native-keep-awake'
21 21
 project(':react-native-keep-awake').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keep-awake/android')
22
+include ':react-native-slider'
23
+project(':react-native-slider').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/slider/android')
22 24
 include ':react-native-sound'
23 25
 project(':react-native-sound').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sound/android')
24 26
 include ':react-native-splash-screen'
@@ -28,4 +30,4 @@ project(':react-native-svg').projectDir = new File(rootProject.projectDir, 	'../
28 30
 include ':react-native-webrtc'
29 31
 project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
30 32
 include ':react-native-webview'
31
-project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
33
+project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')

+ 7
- 6
react/features/participants-pane/components/native/MeetingParticipantList.js Просмотреть файл

@@ -30,18 +30,19 @@ export const MeetingParticipantList = () => {
30 30
     const { t } = useTranslation();
31 31
 
32 32
     // eslint-disable-next-line react/no-multi-comp
33
-    const renderParticipant = id => (
33
+    const renderParticipant = p => (
34
+
34 35
         <MeetingParticipantItem
35
-            key = { id }
36
+            key = { p.id }
36 37
             /* eslint-disable-next-line react/jsx-no-bind */
37
-            onPress = { () => dispatch(showContextMenuDetails(id)) }
38
-            participantID = { id } />
38
+            onPress = { () => !p.local && dispatch(showContextMenuDetails(p.id)) }
39
+            participantID = { p.id } />
39 40
     );
40 41
 
41
-    localParticipant && items.push(renderParticipant(localParticipant?.id));
42
+    items.push(renderParticipant(localParticipant));
42 43
 
43 44
     participants.forEach(p => {
44
-        items.push(renderParticipant(p?.id));
45
+        items.push(renderParticipant(p));
45 46
     });
46 47
 
47 48
     return (

+ 1
- 4
react/features/toolbox/components/native/OverflowMenu.js Просмотреть файл

@@ -8,7 +8,6 @@ import { getFeatureFlag, REACTIONS_ENABLED } from '../../../base/flags';
8 8
 import { connect } from '../../../base/redux';
9 9
 import { StyleType } from '../../../base/styles';
10 10
 import { SharedDocumentButton } from '../../../etherpad';
11
-import { InviteButton } from '../../../invite';
12 11
 import { AudioRouteButton } from '../../../mobile/audio-mode';
13 12
 import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
14 13
 import { ReactionMenu } from '../../../reactions/components';
@@ -126,8 +125,7 @@ class OverflowMenu extends PureComponent<Props, State> {
126 125
                 style: {
127 126
                     ..._bottomSheetStyles.buttons.style,
128 127
                     borderTopLeftRadius: 16,
129
-                    borderTopRightRadius: 16,
130
-                    paddingTop: 16
128
+                    borderTopRightRadius: 16
131 129
                 }
132 130
             }
133 131
         };
@@ -140,7 +138,6 @@ class OverflowMenu extends PureComponent<Props, State> {
140 138
                     : null }>
141 139
                 <AudioRouteButton { ...topButtonProps } />
142 140
                 <ParticipantsPaneButton { ...buttonProps } />
143
-                {!toolbarButtons.has('invite') && <InviteButton { ...buttonProps } />}
144 141
                 <AudioOnlyButton { ...buttonProps } />
145 142
                 {!_reactionsEnabled && !toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
146 143
                 <SecurityDialogButton { ...buttonProps } />

+ 5
- 2
react/features/toolbox/components/native/Toolbox.js Просмотреть файл

@@ -8,7 +8,7 @@ import { getFeatureFlag, REACTIONS_ENABLED } from '../../../base/flags';
8 8
 import { connect } from '../../../base/redux';
9 9
 import { StyleType } from '../../../base/styles';
10 10
 import { ChatButton } from '../../../chat';
11
-import { InviteButton } from '../../../invite';
11
+import { ParticipantsPaneButton } from '../../../participants-pane/components/native';
12 12
 import { ReactionsMenuButton } from '../../../reactions/components';
13 13
 import { TileViewButton } from '../../../video-layout';
14 14
 import { isToolboxVisible, getMovableButtons } from '../../functions.native';
@@ -101,7 +101,10 @@ function Toolbox(props: Props) {
101 101
                         styles = { buttonStylesBorderless }
102 102
                         toggledStyles = { backgroundToggledStyle } />)}
103 103
                 {additionalButtons.has('tileview') && <TileViewButton styles = { buttonStylesBorderless } />}
104
-                {additionalButtons.has('invite') && <InviteButton styles = { buttonStylesBorderless } />}
104
+                {additionalButtons.has('participantspane')
105
+                && <ParticipantsPaneButton
106
+                    styles = { buttonStylesBorderless } />
107
+                }
105 108
                 {additionalButtons.has('togglecamera')
106 109
                       && <ToggleCameraButton
107 110
                           styles = { buttonStylesBorderless }

+ 1
- 1
react/features/toolbox/functions.native.js Просмотреть файл

@@ -25,7 +25,7 @@ export function getMovableButtons(width: number): Set<string> {
25 25
 
26 26
     switch (true) {
27 27
     case width >= WIDTH.FIT_9_ICONS: {
28
-        buttons = [ 'togglecamera', 'chat', 'invite', 'raisehand', 'tileview' ];
28
+        buttons = [ 'togglecamera', 'chat', 'participantspane', 'raisehand', 'tileview' ];
29 29
         break;
30 30
     }
31 31
     case width >= WIDTH.FIT_8_ICONS: {

+ 2
- 1
react/features/video-menu/components/native/VolumeSlider.js Просмотреть файл

@@ -1,8 +1,9 @@
1 1
 // @flow
2 2
 
3
+import Slider from '@react-native-community/slider';
3 4
 import _ from 'lodash';
4 5
 import React, { PureComponent } from 'react';
5
-import { Slider, View } from 'react-native';
6
+import { View } from 'react-native';
6 7
 import { withTheme } from 'react-native-paper';
7 8
 
8 9
 import { Icon, IconVolumeEmpty } from '../../../base/icons';

Загрузка…
Отмена
Сохранить