fix(thumbnails, rn) Hide empty indicators container on native (#11019)

This commit is contained in:
Robert Pintilii 2022-02-24 14:17:02 +02:00 committed by GitHub
parent 011fe40853
commit fde33b72d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View File

@ -69,12 +69,12 @@ class DisplayNameLabel extends Component<Props> {
* }}
*/
function _mapStateToProps(state: Object, ownProps: Props) {
const { participantId } = ownProps;
const { participantId, contained } = ownProps;
const participant = getParticipantById(state, participantId);
return {
_participantName: getParticipantDisplayName(state, participantId),
_render: participant && !participant?.local && !participant?.isFakeParticipant
_render: participant && (!participant?.local || contained) && !participant?.isFakeParticipant
};
}

View File

@ -12,8 +12,8 @@ export default {
},
displayNamePadding: {
paddingHorizontal: BaseTheme.spacing[2],
paddingVertical: BaseTheme.spacing[1]
padding: BaseTheme.spacing[1],
paddingRight: 6
},
displayNameText: {

View File

@ -224,8 +224,10 @@ class Thumbnail extends PureComponent<Props> {
indicators.push(<Container
key = 'bottom-indicators'
style = { styles.thumbnailIndicatorContainer }>
{ audioMuted && <AudioMutedIndicator /> }
{ renderModeratorIndicator && <ModeratorIndicator />}
<Container style = { (audioMuted || renderModeratorIndicator) && styles.bottomIndicatorsContainer }>
{ audioMuted && <AudioMutedIndicator /> }
{ renderModeratorIndicator && <ModeratorIndicator />}
</Container>
{
renderDisplayName && <DisplayNameLabel
contained = { true }

View File

@ -134,7 +134,13 @@ export default {
position: 'absolute',
maxWidth: '95%',
overflow: 'hidden',
...indicatorContainer
...indicatorContainer,
padding: 0
},
bottomIndicatorsContainer: {
padding: 2,
flexDirection: 'row'
},
thumbnailTopIndicatorContainer: {