diff --git a/app/components/UserIcon.js b/app/components/UserIcon.js
index 2dae9b4..c4e6c5d 100644
--- a/app/components/UserIcon.js
+++ b/app/components/UserIcon.js
@@ -1,46 +1,50 @@
import React, { useEffect, useState } from'react';
import PropTypes from 'prop-types';
import utils from '../utils';
import { Avatar } from 'react-native-paper';
const UserIcon = (props) => {
if (!props.identity) {
return (null)
}
const name = props.identity.displayName || props.identity.uri;
const photo = props.identity.photo;
let initials = name.split(' ', 2).map(x => x[0]).join('');
const color = utils.generateMaterialColor(props.identity.uri)['300'];
- const avatarSize = props.large ? 120: 50;
+ let avatarSize = props.large ? 120: 50;
+ if (props.carousel === true) {
+ avatarSize = 80;
+ }
if (photo) {
return
}
if (props.identity.uri.search('anonymous') !== -1) {
return (
)
}
if (props.identity.uri.search('videoconference') !== -1) {
return (
)
}
return (
);
};
UserIcon.propTypes = {
identity: PropTypes.object.isRequired,
- large: PropTypes.bool
+ large: PropTypes.bool,
+ carousel: PropTypes.bool
};
export default UserIcon;