fix(thumbnails, rn) Hide empty indicators container on native (#11019)
This commit is contained in:
parent
011fe40853
commit
fde33b72d0
|
@ -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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
displayNamePadding: {
|
displayNamePadding: {
|
||||||
paddingHorizontal: BaseTheme.spacing[2],
|
padding: BaseTheme.spacing[1],
|
||||||
paddingVertical: BaseTheme.spacing[1]
|
paddingRight: 6
|
||||||
},
|
},
|
||||||
|
|
||||||
displayNameText: {
|
displayNameText: {
|
||||||
|
|
|
@ -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 }
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue