Implement contact plugins

This commit is contained in:
MM20
2025-04-06 12:53:38 +02:00
parent cab93f87aa
commit 02cec92d72
14 changed files with 321 additions and 59 deletions
@@ -19,6 +19,9 @@ interface Contact : SavableSearchable {
val postalAddresses: List<PostalAddress>
val customActions: List<CustomContactAction>
override val label: String
get() = name
val summary: String
get() {
return (phoneNumbers.map { it.number } + emailAddresses.map { it.address })
@@ -12,17 +12,41 @@ abstract class ContactPluginContract {
*/
val Id = column<String>("id")
/**
* Uri to view the contact.
*/
val Uri = column<String>("uri")
/**
* The display name of the contact.
* First name + last name, if applicable.
*/
val Name = column<String>("name")
/**
* List of phone numbers associated with the contact.
*/
val PhoneNumbers = column<List<PhoneNumber>>("phone_numbers")
/**
* List of email addresses associated with the contact.
*/
val EmailAddresses = column<List<EmailAddress>>("email_addresses")
/**
* List of postal addresses associated with the contact.
*/
val PostalAddresses = column<List<PostalAddress>>("postal_addresses")
/**
* List of custom actions associated with the contact.
*/
val CustomActions = column<List<CustomContactAction>>("custom_actions")
/**
* Uri to the contact's photo.
*/
val PhotoUri = column<String>("photo_uri")
}
}