feat(participants/native) - updated container styles
This commit is contained in:
parent
3fcfb64338
commit
8d737adc65
|
@ -31,7 +31,7 @@ type Props = {
|
|||
}
|
||||
|
||||
const CollapsibleList = ({ children, containerStyle, onLongPress, title }: Props) => {
|
||||
const [ collapsed, setCollapsed ] = useState(true);
|
||||
const [ collapsed, setCollapsed ] = useState(false);
|
||||
const _toggleCollapsed = useCallback(() => {
|
||||
setCollapsed(!collapsed);
|
||||
}, [ collapsed ]);
|
||||
|
|
|
@ -50,11 +50,21 @@ type Props = {
|
|||
*/
|
||||
_sortedRemoteParticipants: Map<string, string>,
|
||||
|
||||
/**
|
||||
* List of breakout rooms that were created.
|
||||
*/
|
||||
breakoutRooms: Array,
|
||||
|
||||
/**
|
||||
* The redux dispatch function.
|
||||
*/
|
||||
dispatch: Function,
|
||||
|
||||
/**
|
||||
* List of participants waiting in lobby.
|
||||
*/
|
||||
lobbyParticipants: Array,
|
||||
|
||||
/**
|
||||
* Participants search string.
|
||||
*/
|
||||
|
@ -180,6 +190,8 @@ class MeetingParticipantList extends PureComponent<Props> {
|
|||
_participantsCount,
|
||||
_showInviteButton,
|
||||
_sortedRemoteParticipants,
|
||||
breakoutRooms,
|
||||
lobbyParticipants,
|
||||
t
|
||||
} = this.props;
|
||||
const title = _currentRoom?.name
|
||||
|
@ -192,12 +204,19 @@ class MeetingParticipantList extends PureComponent<Props> {
|
|||
// Regarding the fact that we have 3 sections, we apply
|
||||
// a certain height percentage for every section in order for all to fit
|
||||
// inside the participants pane container
|
||||
// If there are only meeting participants available,
|
||||
// we take the full container height
|
||||
const onlyMeetingParticipants
|
||||
= breakoutRooms.length === 0 && lobbyParticipants.length === 0;
|
||||
const containerStyle
|
||||
= _participantsCount > 3 && styles.meetingListContainer;
|
||||
= onlyMeetingParticipants
|
||||
? styles.meetingListFullContainer : styles.meetingListContainer;
|
||||
const finalContainerStyle
|
||||
= _participantsCount > 3 && containerStyle;
|
||||
|
||||
return (
|
||||
<CollapsibleList
|
||||
containerStyle = { containerStyle }
|
||||
containerStyle = { finalContainerStyle }
|
||||
title = { title } >
|
||||
{
|
||||
_showInviteButton
|
||||
|
|
|
@ -19,6 +19,10 @@ import {
|
|||
getCurrentRoomId,
|
||||
isInBreakoutRoom
|
||||
} from '../../../breakout-rooms/functions';
|
||||
import {
|
||||
getKnockingParticipants,
|
||||
getLobbyEnabled
|
||||
} from '../../../lobby/functions';
|
||||
import MuteEveryoneDialog
|
||||
from '../../../video-menu/components/native/MuteEveryoneDialog';
|
||||
import {
|
||||
|
@ -63,11 +67,15 @@ const ParticipantsPane = () => {
|
|||
&& participantsCount > 2 && rooms.length > 1;
|
||||
const addBreakoutRoom
|
||||
= _isBreakoutRoomsSupported && !hideAddRoomButton && isLocalModerator;
|
||||
const lobbyEnabled = useSelector(getLobbyEnabled);
|
||||
const lobbyParticipants = useSelector(getKnockingParticipants);
|
||||
|
||||
return (
|
||||
<JitsiScreen style = { styles.participantsPaneContainer }>
|
||||
<LobbyParticipantList />
|
||||
<MeetingParticipantList
|
||||
breakoutRooms = { _isBreakoutRoomsSupported && rooms }
|
||||
lobbyParticipants = { lobbyEnabled && lobbyParticipants }
|
||||
searchString = { searchString }
|
||||
setSearchString = { setSearchString } />
|
||||
{
|
||||
|
|
|
@ -196,7 +196,7 @@ export default {
|
|||
},
|
||||
|
||||
lobbyListContent: {
|
||||
height: '20%'
|
||||
height: '16%'
|
||||
},
|
||||
|
||||
lobbyListDescription: {
|
||||
|
@ -217,7 +217,11 @@ export default {
|
|||
},
|
||||
|
||||
meetingListContainer: {
|
||||
height: '60%'
|
||||
height: '56%'
|
||||
},
|
||||
|
||||
meetingListFullContainer: {
|
||||
height: '82%'
|
||||
},
|
||||
|
||||
meetingListDescription: {
|
||||
|
|
Loading…
Reference in New Issue