ContactScreen.js use either firstname or lastname or both on Name column
This commit is contained in:
parent
66784532b4
commit
0ef471e175
1 changed files with 4 additions and 2 deletions
|
|
@ -266,7 +266,9 @@ class ContactScreen extends React.Component {
|
|||
*/
|
||||
Item(contact) {
|
||||
const displayName =
|
||||
String(contact.lastname ?? '').toUpperCase() + ' ' + contact.firstname;
|
||||
String(contact.lastname ?? '').toUpperCase() +
|
||||
' ' +
|
||||
(contact.firstname ?? '');
|
||||
return (
|
||||
<View style={styles.item}>
|
||||
<TouchableOpacity
|
||||
|
|
@ -277,7 +279,7 @@ class ContactScreen extends React.Component {
|
|||
})
|
||||
}>
|
||||
<Text style={{ ...styles.clickable, color: this.props.mainColor }}>
|
||||
{contact.lastname && contact.firstname ? displayName : contact.id}
|
||||
{contact.lastname || contact.firstname ? displayName : contact.id}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity onPress={() => this.composeNewEmailTo(contact.email)}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue