Add support for Contact.nickname field.

This commit is contained in:
Greyson Parrelli
2024-09-27 10:46:37 -04:00
parent 5bdc7c2740
commit 62b5276c75
10 changed files with 61 additions and 127 deletions

View File

@@ -65,7 +65,6 @@ import org.thoughtcrime.securesms.payments.Direction
import org.thoughtcrime.securesms.payments.FailureReason
import org.thoughtcrime.securesms.payments.State
import org.thoughtcrime.securesms.payments.proto.PaymentMetaData
import org.thoughtcrime.securesms.profiles.ProfileName
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.recipients.RecipientId
import org.thoughtcrime.securesms.stickers.StickerLocator
@@ -1021,8 +1020,7 @@ class ChatItemImportInserter(
}
private fun ContactAttachment.Name?.toLocal(): Contact.Name {
val displayName = ProfileName.fromParts(this?.givenName, this?.familyName).toString()
return Contact.Name(displayName, this?.givenName, this?.familyName, this?.prefix, this?.suffix, this?.middleName)
return Contact.Name(this?.givenName, this?.familyName, this?.prefix, this?.suffix, this?.middleName, null)
}
private fun ContactAttachment.Phone.Type?.toLocal(): Contact.Phone.Type {