[Problem/Question]
// Detailed description of issue.
Greetings,
The onPressAvatar function in MessageRenderer, if my conjecture is correct, is not being utilized within MessageIncomingAvatar. Consequently, the avatar click is operational under all circumstances. Could you possibly verify this?
// If problem, please fill out the below. If question, please delete.
[UIKit Version]
// What version of the SDK are you using?
- 2.5.0
[Reproduction Steps]
// Please provide reproduction steps and, if possible, code snippets.
<GroupChannelFragment
channel={channel}
keyboardAvoidOffset={height}
onPressMediaMessage={(fileMessage, deleteMessage) => {
navigation.navigate('SendbirdFileViewer', {
serializedFileMessage: fileMessage.serialize(),
deleteMessage,
});
}}
onChannelDeleted={() => {
navigation.navigate('ChannelList');
}}
onPressHeaderLeft={() => {
navigation.goBack();
}}
onPressHeaderRight={() => {}}
renderMessage={props => <MessageRenderer {...props} onPressAvatar={() => {}} />}
/>
const MessageIncomingAvatar = ({ message, grouping }: Props) => {
const { show } = useUserProfile();
if (grouping) return <View style={styles.avatar} />;
return (
<View style={styles.avatar}>
{(message.isFileMessage() || message.isUserMessage()) && (
<Pressable onPress={() => show(message.sender)}>
<Avatar size={26} uri={message.sender?.profileUrl} />
</Pressable>
)}
</View>
);
};
[Frequency]
// How frequently is this issue occurring?
- Always
[Current impact]
// How is this currently impacting your implementation?
- At present, we have no intention of employing the avatar click event. Therefore, I should be able to resolve this by passing null to onPressAvatar.