fix avatar on header for tablets

This commit is contained in:
Reinaldo Neto 2023-01-10 16:57:51 -03:00
parent fe35747b52
commit 759504e46f
2 changed files with 4 additions and 1 deletions

View File

@ -24,6 +24,7 @@ const styles = StyleSheet.create({
});
interface ILeftButtonsProps {
rid?: string;
tmid?: string;
unreadsCount: number | null;
navigation: StackNavigationProp<ChatsStackParamList, 'RoomView'>;
@ -38,6 +39,7 @@ interface ILeftButtonsProps {
}
const LeftButtons = ({
rid,
tmid,
unreadsCount,
navigation,
@ -78,7 +80,7 @@ const LeftButtons = ({
}
if (baseUrl && userId && token) {
return <Avatar text={title} size={30} type={t} style={styles.avatar} onPress={onPress} />;
return <Avatar rid={rid} text={title} size={30} type={t} style={styles.avatar} onPress={onPress} />;
}
return null;
};

View File

@ -588,6 +588,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
headerRightContainerStyle: { flexGrow: undefined, flexBasis: undefined },
headerLeft: () => (
<LeftButtons
rid={rid}
tmid={tmid}
unreadsCount={unreadsCount}
navigation={navigation}