Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export type SuggestedMentionListProps = {
inputHeight: number;
onPressToMention: (user: SendbirdMember, searchStringRange: Range) => void;
mentionedUsers: MentionedUser[];
/**
* Whether to show user id information on each item.
* */
showUserId?: boolean;
};

export type ChannelInputProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const GroupChannelSuggestedMentionList = ({
bottomInset,
onPressToMention,
mentionedUsers,
showUserId = true,
}: GroupChannelProps['SuggestedMentionList']) => {
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
const { channel } = useContext(GroupChannelContexts.Fragment);
Expand Down Expand Up @@ -79,9 +80,11 @@ const GroupChannelSuggestedMentionList = ({
<Text body2 color={colors.onBackground01} numberOfLines={1} style={styles.userNickname}>
{member.nickname || STRINGS.LABELS.USER_NO_NAME}
</Text>
<Text body3 color={colors.onBackground03} numberOfLines={1} style={styles.userId}>
{member.userId}
</Text>
{!!showUserId && (
<Text body3 color={colors.onBackground03} numberOfLines={1} style={styles.userId}>
{member.userId}
</Text>
)}
<Divider style={{ position: 'absolute', bottom: 0 }} />
</Box>
</Pressable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const GroupChannelThreadSuggestedMentionList = ({
bottomInset,
onPressToMention,
mentionedUsers,
showUserId = true,
}: GroupChannelThreadProps['SuggestedMentionList']) => {
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
const { channel } = useContext(GroupChannelThreadContexts.Fragment);
Expand Down Expand Up @@ -78,9 +79,11 @@ const GroupChannelThreadSuggestedMentionList = ({
<Text body2 color={colors.onBackground01} numberOfLines={1} style={styles.userNickname}>
{member.nickname || STRINGS.LABELS.USER_NO_NAME}
</Text>
<Text body3 color={colors.onBackground03} numberOfLines={1} style={styles.userId}>
{member.userId}
</Text>
{!!showUserId && (
<Text body3 color={colors.onBackground03} numberOfLines={1} style={styles.userId}>
{member.userId}
</Text>
)}
<Divider style={{ position: 'absolute', bottom: 0 }} />
</View>
</Pressable>
Expand Down