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) { function _mapStateToProps(state: Object, ownProps: Props) {
const { participantId } = ownProps; const { participantId, contained } = ownProps;
const participant = getParticipantById(state, participantId); const participant = getParticipantById(state, participantId);
return { return {
_participantName: getParticipantDisplayName(state, participantId), _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: { displayNamePadding: {
paddingHorizontal: BaseTheme.spacing[2], padding: BaseTheme.spacing[1],
paddingVertical: BaseTheme.spacing[1] paddingRight: 6
}, },
displayNameText: { displayNameText: {

View File

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

View File

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