copy name too

This commit is contained in:
Sathurshan 2024-03-22 18:12:36 +05:30
parent 9f08ef5f9b
commit e27e4713d1
1 changed files with 9 additions and 3 deletions
app/views/RoomInfoView/components

View File

@ -31,9 +31,15 @@ const RoomInfoViewTitle = ({ room, name, username, statusText, type }: IRoomInfo
if (type === SubscriptionType.DIRECT) {
return (
<View style={styles.roomInfoViewTitleContainer}>
<Text testID='room-info-view-name' style={[styles.roomTitle, { color: colors.titleText }]}>
{name}
</Text>
{name && (
<Text
onLongPress={() => copyInfoToClipboard(name)}
testID='room-info-view-name'
style={[styles.roomTitle, { color: colors.titleText }]}
>
{name}
</Text>
)}
{username && (
<Text
onLongPress={() => copyInfoToClipboard(username)}