Contact stuff
This commit is contained in:
@@ -8,13 +8,17 @@ import de.mm20.launcher2.icons.ColorLayer
|
||||
import de.mm20.launcher2.icons.StaticLauncherIcon
|
||||
import de.mm20.launcher2.icons.TextLayer
|
||||
import de.mm20.launcher2.icons.VectorLayer
|
||||
import de.mm20.launcher2.search.contact.CustomContactChannel
|
||||
import de.mm20.launcher2.search.contact.EmailAddress
|
||||
import de.mm20.launcher2.search.contact.PhoneNumber
|
||||
import de.mm20.launcher2.search.contact.PostalAddress
|
||||
|
||||
interface Contact : SavableSearchable {
|
||||
val name: String
|
||||
val phoneNumbers: List<PhoneNumber>
|
||||
val emailAddresses: List<EmailAddress>
|
||||
val postalAddresses: List<PostalAddress>
|
||||
val contactApps: List<ContactApp>
|
||||
val contactChannels: List<CustomContactChannel>
|
||||
|
||||
val summary: String
|
||||
get() {
|
||||
@@ -41,32 +45,3 @@ interface Contact : SavableSearchable {
|
||||
override val preferDetailsOverLaunch: Boolean
|
||||
get() = true
|
||||
}
|
||||
|
||||
data class PhoneNumber(
|
||||
val number: String,
|
||||
val type: ContactInfoType,
|
||||
)
|
||||
|
||||
data class EmailAddress(
|
||||
val address: String,
|
||||
val type: ContactInfoType,
|
||||
)
|
||||
|
||||
data class PostalAddress(
|
||||
val address: String,
|
||||
val type: ContactInfoType,
|
||||
)
|
||||
|
||||
data class ContactApp(
|
||||
val label: String,
|
||||
val uri: Uri,
|
||||
val mimeType: String,
|
||||
val packageName: String,
|
||||
)
|
||||
|
||||
enum class ContactInfoType {
|
||||
Home,
|
||||
Mobile,
|
||||
Work,
|
||||
Other,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user