fix avatar on header for tablets
This commit is contained in:
parent
fe35747b52
commit
759504e46f
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue